Mysql and MD5 hash problem
#5

It's MySQL function, so you cannot use it in pawn obviously .

Connect tables via IDs rather by names, so you can change names however you want and it won't get messed up.
Then under OnPlayerRequestClass or something get account ID.
Quote:

SELECT acc_id FROM account WHERE Username='%s'

If you get any results account exists if no then it doesn't.
And then get data from account.
Код:
SELECT * FROM account WHERE Username='%s' AND Password=MD5('%s')
If you get results password was right otherwise no.

And don't forget to escape password to prevent SQL injections. And next time ask in plugin's topic if you have issues with MySQL.
Reply


Messages In This Thread
Mysql and MD5 hash problem - by ft941 - 05.06.2010, 10:13
Re: Mysql and MD5 hash problem - by ft941 - 06.06.2010, 08:09
Re: Mysql and MD5 hash problem - by Sergei - 06.06.2010, 08:11
Re: Mysql and MD5 hash problem - by ft941 - 06.06.2010, 08:36
Re: Mysql and MD5 hash problem - by Sergei - 06.06.2010, 08:44
Re: Mysql and MD5 hash problem - by ft941 - 06.06.2010, 15:41
Re: Mysql and MD5 hash problem - by ft941 - 07.06.2010, 15:20
Re: Mysql and MD5 hash problem - by ft941 - 09.06.2010, 08:53
Re: Mysql and MD5 hash problem - by ft941 - 11.06.2010, 11:53
Re: Mysql and MD5 hash problem - by ft941 - 15.06.2010, 19:14

Forum Jump:


Users browsing this thread: 1 Guest(s)