also it would probably help if you combined those queries
Code:
SELECT p.*,f.* FROM ".$prfx."posts p LEFT JOIN ".$prfx."forums f ON f.fid=p.fid ORDER BY p.dateline DESC LIMIT ".$num
that will grab both of the information at once, instead of running multiple queries, however u may only want to select certain fields from the forums table so it doesn't overwrite anything in the posts table
Code:
SELECT p.*,f.forumdid,f.name FROM ".$prfx."posts p LEFT JOIN ".$prfx."forums f ON f.fid=p.fid ORDER BY p.dateline DESC LIMIT ".$num
etc..