How to check this ? (MySQL)
#1

This doesnt work, but it un-bans (without the rows > 1 part), but I wanted to check if the account was valid....How would I get this to work

pawn Код:
format(query, sizeof(query), "SELECT * FROM `accounts` WHERE `PlayerName` = '%s'", string);
    mysql_store_result();
    new rows = mysql_num_rows();
    if(rows > 0)
    {
        TUnbanPlayer(string);
        format(string, sizeof(string), "You have unbanned account(Temp Ban) %s", string);
        SendClientMessage(playerid, COLOUR_REALRED, string);
    }
    if(rows == 0)
    {
        SendClientMessage(playerid, COLOUR_GREY, "There are no accounts found with that name.");
    }
    mysql_free_result();
Reply


Messages In This Thread
How to check this ? (MySQL) - by Dokins - 25.01.2012, 15:52
Re: How to check this ? (MySQL) - by Snowman12 - 25.01.2012, 15:58
Re: How to check this ? (MySQL) - by Dokins - 25.01.2012, 16:00

Forum Jump:


Users browsing this thread: 1 Guest(s)