Count bans in a MySQL system
#5

Your query syntax is abit wrong, it will always select only one row, as you set LIMIT 1, in your case you should use
pawn Код:
new row[24];
    mysql_query( "SELECT COUNT(`name`) FROM `banlog` WHERE (`name` = '%s' OR `ip` = '%s')   AND `banned` = '1'" );
    mysql_store_result();
    mysql_fetch_row(row,"|")
    new Count = strval(row);
    mysql_free_result();
Reply


Messages In This Thread
Count bans in a MySQL system - by Neil. - 30.01.2013, 08:42
Re: Count bans in a MySQL system - by BlackRaven - 30.01.2013, 09:02
Re: Count bans in a MySQL system - by Neil. - 30.01.2013, 09:27
Re: Count bans in a MySQL system - by BlackRaven - 30.01.2013, 10:13
Re: Count bans in a MySQL system - by ikey07 - 30.01.2013, 10:25
Re: Count bans in a MySQL system - by Neil. - 30.01.2013, 10:40
Re: Count bans in a MySQL system - by Sinner - 30.01.2013, 11:01
Re: Count bans in a MySQL system - by Neil. - 30.01.2013, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)