sql_query(" SELECT DISTINCT {$table_prefix}topics.topic_title, {$table_prefix}topics.topic_id, {$table_prefix}topics.topic_replies, {$table_prefix}topics.topic_views, {$table_prefix}topics.topic_poster {$table_prefix}users.username AS poster_name, {$table_prefix}users.user_id FROM {$table_prefix}topics, {$table_prefix}users LEFT JOIN {$table_prefix}forums ON cat_id = {$cat_id} WHERE {$table_prefix}_users.user_id = {$table_prefix}_topics.topic_poster ORDER BY {$table_prefix}topics.topic_id DESC LIMIT {$limit_count}; ");*/ $topics_query = $db->sql_query(" SELECT {$table_prefix}topics.topic_title, {$table_prefix}topics.topic_id, {$table_prefix}topics.topic_replies, {$table_prefix}topics.topic_views, {$table_prefix}topics.topic_poster, {$table_prefix}users.username AS poster_name, {$table_prefix}users.user_id FROM {$table_prefix}topics, {$table_prefix}users LEFT JOIN {$table_prefix}forums ON cat_id = {$cat_id} WHERE {$table_prefix}_users.user_id = {$table_prefix}_topics.topic_poster ORDER BY {$table_prefix}topics.topic_id DESC LIMIT {$limit_count}; "); if($topics_query && mysql_num_rows($topics_query)) { while($topic_entry = $db->sql_fetchrow($topics_query)) { $poster_name = $topic_entry["poster_name"]; $topic_title = $topic_entry["topic_title"]; $topic_replies = $topic_entry["topic_replies"]; $topic_views = $topic_entry["topic_views"]; $topic_id = $topic_entry["topic_id"]; $view_link = "{$phpbb_root_path}viewtopic.{$phpEx}?t={$topic_id}"; echo "