PDA

View Full Version : reading 2 or more forums check this out


TaP
04-06-2002, 06:42 AM
ok say i got

// Top Threads starter
$toptstarter=$DB_site->query_first("SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1");

if i wanted it to read just a certain forum i would enter Where formid=(forums number)

but how would i make it read from multiple forums? like say form 1,2,3,4 and 5

i tried putting formid=1,2,3,4

but that gave me an error.... any help would be outstanding

TaP
04-06-2002, 07:16 AM
close this please.... i figured this out

Admin
04-06-2002, 07:19 AM
WHERE forumid IN (1,2,3,4,5)
Or, if you like writing massive code, and lots of it:
WHERE forumid=1 OR forumid=2 OR forumid=3 OR forumid=4 OR forumid=5
;)