15.01.2015, 10:13
Umm, Try this
My result is a global variable, I didn't get any errors with it, if you got errors with that code ^^, try to make "Cashe:result" a global variable (Outside the function).
pawn Код:
new query[100], pname[24], pass[30];
new cache:result;
GetPlayerName(playerid, pname, 24);
mysql_escape_string(inputtext , pass);
mysql_format(Connectionhandle, query, sizeof(query), "SELECT * FROM `playerdata` WHERE `password`= SHA1('%s') AND `user`='%s'", pass, pname);//change `password` to your password name.
result = mysql_query(MySQL, query);
if(cache_get_row_count() > 0)
{
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `` WHERE `user` = '%e' LIMIT 1",);
mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
}
cache_delete(result);