+1  A: 

Looks like you know the IDs beforehand which are to be rejected. Then do this in the first query -

$recent = mysql_query("SELECT * FROM forum_posts where forum_id NOT IN (24, 25, 35) ORDER BY post_time DESC LIMIT 5"); 

Still fetches 5 results excluding the unwanted

And following is the consolidated query which does the same task as done by your 3 queries

$recent = mysql_query("SELECT fposts.username FROM forum_posts as fposts INNER JOIN forum_topics AS ftopics ON (ftopics.topic_id = fposts.topic_id)
INNER JOIN forum_users AS fusers ON (fusers.user_id = forum_posts.poster_id)

WHERE fposts.forum_id NOT IN (24, 25, 35) ORDER BY fposts.post_time DESC LIMIT 5");

while ($recent_row = mysql_fetch_assoc($recent))
{
     echo "$username posted in \"". "$recent_row['username']\""; 
}
sandeepan
$recent line worked perfectly, thanks a lot.
Doug
A: 

Everything in one query:

$query = "
SELECT *, 
(SELECT ft.topic_title FROM forum_topics ft WHERE ft.topic_id= fp.topic_id) topic_title, 
(SELECT fu.username FROM forum_users fu WHERE fu.user_id= fp.poster_id) username 
FROM fp.forum_posts 
where fp.id not in (24, 25, 35) 
group by fp.forum_id 
ORDER BY fp.post_time DESC 
LIMIT 5";
OIS