26.10.2018, 09:26
This will not work (no active cache): https://github.com/willbedie/MySQL-L...g.pwn#L92-#L93
You select everything from the row twice + another one to select the password:
https://github.com/willbedie/MySQL-L...g.pwn#L45-#L46
https://github.com/willbedie/MySQL-L...pwn#L126-#L127
https://github.com/willbedie/MySQL-L...g.pwn#L91-#L92
The first query should lookup the database by the name of the player. Any other query should identify records by their registration ID.
Set necessary keys (name of player will always be unique) to improve searching speed.
In `OnPlayerRegister` public function you should retrieve the insert id generated using the cache function: https://github.com/willbedie/MySQL-L...pwn#L111-#L117
Since you have two different scripts, one with bcrypt and the other one with Whirlpool you should have a .sql file for each one of them.
bcrypt output is 60 so why `Password` column to be varchar(129)? It is also a fixed-length so make it char(60).
Set default values for cash, kills and deaths.
When you know an amount (integer value) cannot be negative, declare it as unsigned.
There are different integer types, you should choose wisely: https://dev.mysql.com/doc/refman/8.0...ger-types.html
You select everything from the row twice + another one to select the password:
https://github.com/willbedie/MySQL-L...g.pwn#L45-#L46
https://github.com/willbedie/MySQL-L...pwn#L126-#L127
https://github.com/willbedie/MySQL-L...g.pwn#L91-#L92
The first query should lookup the database by the name of the player. Any other query should identify records by their registration ID.
Set necessary keys (name of player will always be unique) to improve searching speed.
In `OnPlayerRegister` public function you should retrieve the insert id generated using the cache function: https://github.com/willbedie/MySQL-L...pwn#L111-#L117
Since you have two different scripts, one with bcrypt and the other one with Whirlpool you should have a .sql file for each one of them.
bcrypt output is 60 so why `Password` column to be varchar(129)? It is also a fixed-length so make it char(60).
Set default values for cash, kills and deaths.
When you know an amount (integer value) cannot be negative, declare it as unsigned.
There are different integer types, you should choose wisely: https://dev.mysql.com/doc/refman/8.0...ger-types.html