PDA

View Full Version : 2 queries tied together?


TECK
07-09-2002, 01:56 PM
i have this code:$getthreads=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost>$bbuserinfo[lastvisit]");
$lastthreads=number_format($getthreads['threads']);
$getposts=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline>$bbuserinfo[lastvisit]");
$lastposts=number_format($getposts['posts']);is there a way to perform one single query instead of 2?

Neo
07-09-2002, 08:02 PM
I dont thing so. Unless it was from the same table.

g-force2k2
07-10-2002, 04:54 AM
yeah from my small knowledge of mysql i have to agree with neo... i doubt its possible ;\

g-force2k2