07.10.2018, 03:23
This has been updated to escape values retrieved via pointer by SaveAccountData. Note that the plain text from RegisterPlayer and LoginPlayer are left alone. This is as these values are hashed via Whirlpool prior to be executed.
I haven't really tested this with enums. Most modes written now days are done so in modules which removes the need for monstrous "player enums". My guess would be the second version should work.
Thanks! I highly doubt there would be a mentionable difference in speed unless pointers.inc introduces something. If you take a look at the implementation of LoadAccountData and SaveAccountData, they are both essentially just query calls. They just build the query dynamically. Wouldn't hurt to run some tests though.
Quote:
pawn Код:
While these should: pawn Код:
|
Quote:
I really like the idea and i'd love to see some benchmarks, i know it's going to be slower than direct SQL queries but i want to see how much slower.
And if it performs out pretty well, you could implement a MySQL version of this and even take this further and create something like my EasyDB tried to achieve, but this would be way better approach! |