I hope to get a little help from you. I would like to drop a couple user names from the Top Poster part of the Forum Centre Block so I tried to do the following and I got an error.
Original code
$result=$db->sql_query('SELECT a.user_id, a.username, a.user_posts, a.user_avatar FROM '.$user_prefix.'_users a ORDER BY user_posts DESC LIMIT 0,14');
I added NOT IN ('Admin', 'Helitown')
Because I don't want to get the users Admin and Helitown and I get errorunexpected T_STRING. please see the modified code below.
$result=$db->sql_query('SELECT a.user_id, a.username, a.user_posts, a.user_avatar FROM '.$user_prefix.'_users a WHER a.username NOT IN ('Admin', 'helitown')ORDER BY user_posts DESC LIMIT 0,7');
and also I would also need help to add another row of top poster to the block if you could give me some hints.
Thank you very much!
Please enter your server specs in your user profile! 😢
PhoenixOffline
Joined: Mar 18, 2004
Posts: 1543
Location: Netosphere
I really prefer that DF issues are dealt with on DF forums, for everyone's benefit. Anyway, WHERE is mispelt, and switch your quotes around$result=$db->sql_query("SELECT a.user_id, a.username, a.user_posts, a.user_avatar FROM {$user_prefix}_users a
WHERE a.username NOT IN ('Admin', 'helitown')
ORDER BY user_posts DESC
LIMIT 0,7")