23.05.2014, 11:05
It's not so nessesary, just call a callback with the query execution (use threaded query)
+rep if helped
pawn Код:
// Example:
public OnPlayerConnect(playerid)
{
mysql_tquery(1, "SELECT * FROM accounts WHERE name = 'myname'", "LoadPlayerData", "i", playerid);
return 1;
}
forward LoadPlayerData(playerid);
public LoadPlayerData(playerid)
{
//now here you can use cache functions as cache_num_rows(); which means the same thing as mysql_num_rows
return 1;
}