Ok, I think I fixed it. I changed the top poster query to this:
PHP Code:
$topposter = $db->query_first("
SELECT user.userid, user.username, COUNT(post.postid) AS postcount
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
WHERE thread.forumid=$forumid AND thread.firstpostid = post.postid
GROUP BY post.userid
ORDER BY postcount DESC
LIMIT 1
");
I added this:
PHP Code:
AND thread.firstpostid = post.postid
to this:
PHP Code:
WHERE thread.forumid=$forumid
and it seemed to fix it. Still, is there a way to combine these 2 queries and get all the same info out of it?