06.04.2017, 19:41
Hello i have a problem about a query, i know it's mysql_query but i need the result "instant"
I try to get the salt from database , but always return as a empty string adn the login system not working becasue there is no salt , how to make this query work?
PHP код:
new Cache:csalt,squery[128];
mysql_format(SQL, squery, sizeof(squery), "SELECT `salt` FROM `users` WHERE `name` = '%e'", GetName(playerid));
csalt = mysql_query(SQL, squery);
if(cache_num_rows() > 0)
{
cache_get_field_content(0, "salt", PlayerInfo[playerid][pSalt], SQL);
}
cache_delete(csalt, SQL);
format(squery, sizeof(squery), "Salt: %s",PlayerInfo[playerid][pSalt]);
print(squery);