24.01.2016, 07:35
Try this :
PHP код:
IPBanned(const str[])
{
new query[85],Cache:result,rows;
// you dont really need to select anything if you just need to check if ip is there
// you can just use row count to see if ip exists or not
// notice change in query here and always use %e
mysql_format(mysql, query, sizeof(query), "SELECT NULL FROM `ipbanned` WHERE `IP` = '%e' LIMIT 1",str);
result = mysql_query(mysql, query);
rows = cache_num_rows();
cache_delete(result);
return rows;
}