PDA

View Full Version : Forumid in Post?? Need help! Plz...


Bald Bouncer
11-15-2001, 08:34 AM
// Find out how many threads this user has started
$startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postusername='$post[username]' AND open!='10'");
$starts = $startcount[starts];
// end find threads started


Right I want the above hack to count from 2 forums only, not the entire board....But whenever I add the forumid into it, I get a table not found...Im really at a loss to get this to work, can anyone help? :confused:

Admin
11-15-2001, 10:29 AM
// Find out how many threads this user has started
$startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE forumid IN (1,2) AND postusername='$post[username]' AND open!='10'");
$starts = $startcount[starts];
// end find threads started

I hope you don't put this in the getpostbit() function...?

Bald Bouncer
11-15-2001, 12:26 PM
yes I was, couldnt really notice much slowdown though so I wasnt too bothered as long as it works :D

cheers for the help mate....appreciated