(Crashes script) Trying to get ALL MySQL results.
#2

pawn Код:
format(query, sizeof(query), "SELECT `Number` FROM `accounts` WHERE `PlayerName` LIKE '%%%s%%'", player);
    mysql_query(query);
    mysql_store_result();
    new rows = mysql_num_rows();
    if(rows == 0)
    {
        SendClientMessage(playerid, COLOUR_GREY, "There was no numbers found with that name.");
    }
    else
    {
        new msnum = mysql_fetch_int();
        format(string, sizeof(string), "%s - %d",player, msnum);
        SendClientMessage(playerid, COLOUR_WHITE, string);
    }
    mysql_free_result();
Reply


Messages In This Thread
(Crashes script) Trying to get ALL MySQL results. - by Dokins - 08.03.2012, 17:03
Re: (Crashes script) Trying to get ALL MySQL results. - by MadeMan - 08.03.2012, 17:33
Re: (Crashes script) Trying to get ALL MySQL results. - by Dokins - 08.03.2012, 18:03
Re: (Crashes script) Trying to get ALL MySQL results. - by Dokins - 08.03.2012, 18:08
Re: (Crashes script) Trying to get ALL MySQL results. - by MadeMan - 08.03.2012, 18:16
Re: (Crashes script) Trying to get ALL MySQL results. - by Dokins - 08.03.2012, 18:18
Re: (Crashes script) Trying to get ALL MySQL results. - by Dokins - 08.03.2012, 18:24

Forum Jump:


Users browsing this thread: 1 Guest(s)