24.03.2018, 14:00
Hello,
I have a problem.
i use the following query:
But it always returns wrong password. I have tried this with md5 and sha1. The database field has the correct type and it even works in PHP. Why does this not work with pawn?
I did also try to login without encryption so i created another field with a password for testing purposes.
like this:
And this actually works fine. strange...
Any help would be appreciated
I have a problem.
i use the following query:
PHP код:
SELECT * FROM `USERS` WHERE `USERNAME` = '%s' AND `PASSWORD` = sha1('%s')
I did also try to login without encryption so i created another field with a password for testing purposes.
like this:
PHP код:
db_get_field_assoc(LOGIN_RESULT, "SPID", PasswordPlayer[playerid], 50);
if(!strcmp(PasswordLogin[playerid],PasswordPlayer[playerid],true))
{
SendClientMessage(playerid,-1,"test");
}
else return ShowErrorDialog(playerid, "Wrong password!");
Any help would be appreciated