General > General > Need help with Forum Centre Block Module > Community Forums > Phoenix Netology
Forum Index > General

Need help with Forum Centre Block Module Reply to topic


Hello Nukebiz,

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! 😢


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")

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Oh thanks Phoenix!

Please enter your server specs in your user profile! 😢


I forgot to mention it but I don't see why you are prefixing fields with "a".

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are Australia/Adelaide


Jump to: