06.06.2010, 08:44
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.
If you get any results account exists if no then it doesn't.
And then get data from account.
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.
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' |
And then get data from account.
Код:
SELECT * FROM account WHERE Username='%s' AND Password=MD5('%s')
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.