02.11.2014, 12:09
If coded this function:
It returns 1, although 127.0.0.1 doesn't show up on the 'bans' table.
Here is the state of the 'bans' table:
Why would it return 1 and not 0?
pawn Код:
stock CheckBan(ip[])
{
new
szIp2[MAX_PLAYER_NAME],
szQuery[128];
mysql_real_escape_string(ip, szIp2, gMySQLConnection);
format(szQuery, sizeof(szQuery), "SELECT `IP` FROM `bans` WHERE `IP` = '%s'", ip);
mysql_query(gMySQLConnection, szQuery);
if(cache_get_row_count(gMySQLConnection) > 0) return 1;
return 0;
}
Here is the state of the 'bans' table:
Why would it return 1 and not 0?