Count bans in a MySQL system
#3

Quote:
Originally Posted by BlackRaven
Посмотреть сообщение
Use the function mysql_num_rows It counts all the rows for ya!
Like this?
pawn Код:
stock bancount(playerid)
{
    format(Query, sizeof(Query), "SELECT * FROM `banlog` WHERE (`name` = '%s' OR `ip` = '%s')  AND `banned` = 1 LIMIT 1", escpname(playerid), PIP);
    mysql_store_result();
    new rows = mysql_num_rows();
    mysql_free_result();
   
return rows;
}
When I add it on my string when a hack is detected, it says syntax error in the expression, or invalid func call
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)