PDA

View Full Version : Exclude some users from top10 list


_Mantis
02-08-2003, 10:30 PM
I cant seem to figure out how to exclude a few users from the top10 list-

$topresult = $DB_site->query("SELECT * FROM user ORDER BY storep DESC LIMIT 10");

Thanks for the help.

amykhar
02-08-2003, 10:44 PM
change the query to

$DB_site->query("SELECT * FROM user WHERE userid not in (x,y,z) ORDER BY storep DESC LIMIT 10");

x,y,z would be the userid's of the people you want to exclude. You can add as many as you want, not just 3. Just don't have a comma after the last one.

_Mantis
02-08-2003, 11:23 PM
Thank you very much!