SELECT not work.
#3

pawn Код:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM bans WHERE IP = '%s' AND `Player` = '%e'", playerIP, GetName(playerid));
new Cache:result = mysql_query(MySQLCon, query);
if(cache_num_rows() > 0)
{
    SetTimerEx("KickPublic", 50, false, "i", playerid);
    return 1;
}
cache_delete(result);
Or

pawn Код:
mysql_format(MySQLCon, query, sizeof(query), "SELECT * FROM bans WHERE IP = '%s' AND `Player` = '%e'", playerIP, GetName(playerid));
mysql_tquery(MySQLCon, query, "OnBanCheck", "i", playerid);


forward OnBanCheck(playerid);
public OnBanCheck(playerid)
{
    if(cache_num_rows() > 0)
    {
        SetTimerEx("KickPublic", 50, false, "i", playerid);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
SELECT not work. - by norton2 - 05.12.2015, 21:24
Re: SELECT not work. - by prineside - 05.12.2015, 23:10
Re: SELECT not work. - by PaulDinam - 06.12.2015, 04:47
Re: SELECT not work. - by norton2 - 06.12.2015, 06:20

Forum Jump:


Users browsing this thread: 1 Guest(s)