28.07.2013, 18:04
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:
But apparently this is not how you use mysql_retrieve_row but i have no idea on how to do it
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 );