Thread: PHP Problem
View Single Post
01-07-2007, 07:23 PM
#3
Paris Holley is offline Paris Holley
Status: Member
Join date: Dec 2005
Location:
Expertise:
Software:
 
Posts: 347
iTrader: 0 / 0%
 

Paris Holley is on a distinguished road

  Old

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..