SELECT IFNULL(COUNT(mx_replies.forum_id),0) AS reply_count, IFNULL(COUNT(mx_threads.forum_id),0) AS thread_count, IFNULL(MAX(mx_threads.id), 0) AS last_post, IFNULL(mx_threads.is_new, 0) as is_new, mx_forums.id, mx_forums.forum_name, mx_forums.forum_description FROM mx_forums LEFT JOIN mx_threads ON mx_threads.forum_id = mx_forums.id LEFT JOIN mx_replies ON mx_replies.forum_id = mx_forums.id WHERE mx_forums.category = ? GROUP BY mx_forums.id,forum_name, forum_description ORDER BY mx_forums.create_date DESC