Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner
Boardlink: http://centrumrc.pl
PHP Version: 3.0.9
MySQL Version: 5.1.58
What have you done before the problem was there?
What have you already tryed to solve the problem?
I tried to solve the problem but without success. Everything that I managed to do is this, but does not work :/
Description and Message
hi,
I want to create a block on the right side, which will show the topic and then the amount of topics. Everything that I managed to do is this, but does not work.
index.php
Code: Select all
$forum_id = 4;
$sql = 'SELECT COUNT(topic_id) AS topic_count
FROM ' . TOPICS_TABLE . '
WHERE forum_id = 4';
$result = $db->sql_query($sql);
$topic_count= (int) $db->sql_fetchfield('topic_count');
$db->sql_freeresult($result);
Code: Select all
$template->assign_vars(array(
'TOPIC_COUNT' => $topic_count,
));
Code: Select all
{TOPIC_COUNT}