20.05.2014, 18:32
I am not asking for a script. All I need is to know how I check if an account is in the database as mysql_num_rows was removed. I also do NOT want to go to an old version of the mysql plugin.
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
//Banned
}
else
{
//Not Banned
}
new query[126];
format(query, sizeof(query), "SELECT * FROM bantable WHERE BannedName = '%s' AND status = 1", GetPlayerNameEx(playerid));//Firstly we should select everything from your ban table however you named it.
mysql_tquery(mysql, query,"BanResults","i",playerid); //now we added a call back to check if this name is banned or not,
forward BanResults(playerid);
public BanResults(playerid)
{
if(cache_num_rows(mysql) >=1)
{
//if this name was found.
}
else
{
//cannot find
}
return 1;
}