10.09.2012, 01:18
I need to select some data from the SQL database BEFORE the entire player data set loads.
I am trying to retrieve "psalt" and then store it in a string, so that I can merge it with the input text for the dialogue, any help would be greatly appreciated.
pawn Код:
new EscPass[38], Query[128];
new saltquery[156], salt[32], string[128];
format(saltquery, sizeof(saltquery), "SELECT `psalt` FROM `playerinfo` WHERE `username` = '%s'", pName(playerid));
mysql_query(saltquery);
print(saltquery);
format(salt, sizeof(salt), "%s", mysql_store_result());
print(salt);
format(string, sizeof(string), "%s%s", salt, inputtext);
print(string);
format(Query, sizeof(Query), "SELECT * FROM `playerinfo` WHERE `username` = '%s' AND `ppassword` = md5('%s')", pName(playerid), string);
mysql_query(Query);
mysql_store_result();