Checking if mysql data exist
#1

Код:
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
mysql_format(mysql, query, sizeof(query), "SELECT `IP` FROM `info` WHERE `ip` = '%e' LIMIT 1", plrIP);
mysql_query(mysql, query);
    new rows, fields;
    cache_get_data(rows, fields, mysql);
    if(rows)
    {
    //exist
    }
    else if(!rows)
    {
    // doesnt exist
    }
what is wrong with this code? even if ip exists, this code always shows that it doesnt exist
Reply


Messages In This Thread
Checking if mysql data exist - by ax1 - 23.03.2017, 17:53
Re: Checking if mysql data exist - by Bwandon - 23.03.2017, 17:57
Re: Checking if mysql data exist - by ax1 - 24.03.2017, 17:24

Forum Jump:


Users browsing this thread: 3 Guest(s)