Only excecute the code when atleast 1 row has been found
#1

Hello,

I am busy on mysql and im trying to figure out on how to do it so it only excecutes code when theres atleast 1 row found. This is my code:
pawn Код:
new string[128];
    new pname_[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname_, MAX_PLAYER_NAME);
    mysql_real_escape_string(pname_, pname_);
    format(string, sizeof(string), "SELECT `HouseID` FROM `Houses` WHERE `Houseowner`='%s'", pname_);
    mysql_store_result();
    if(mysql_retrieve_row)
        mysql_function_query( Handle, string, true, "OnPlayerHousesLoad", "d", playerid );
But apparently this is not how you use mysql_retrieve_row but i have no idea on how to do it
Reply


Messages In This Thread
Only excecute the code when atleast 1 row has been found - by thimo - 28.07.2013, 18:04
Re: Only excecute the code when atleast 1 row has been found - by MP2 - 28.07.2013, 18:08
Re: Only excecute the code when atleast 1 row has been found - by thimo - 28.07.2013, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)