Topic: COde
Why isn't this working?
// If there is a last_post/last_poster.
if ($cur_forum['last_post'] != ''){
$tmp = $db->query('SELECT subject FROM '.$db->prefix.'topics WHERE last_post_id="'.$cur_forum['last_post_id'].'"');
$topic_subject = $db->fetch_assoc($tmp);
$last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.$topic_subject['subject'].'</a><br />'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']);
}
else
$last_post = ' ';
That's from index.php. I'm trying to make it so it shows the topic subject instead of the date.