05.06.2015, 13:23
I used mysql_format so we can escape strings using %e specifier (normally you'd use %s).
It executes the query (non-threaded) and cache is set to true so you can use the cache functions.
If there are rows, retrieve the data and assign them to the variable.
The last I suppose is like freeing the result.
I haven't used non-threaded for R33+ but I believe it's correct.
---
About the password, change the type to VARCHAR and length 129 in the table structure. Make sure that pPass has a size of 129 in your enum.
When registering and inserting the password, hash it (the size must be 129 in WP_Hash too) and insert it as a string.
When loading as dusk said, you need to use cache_get_row but as it's enum-array, you have to specify the length.
It executes the query (non-threaded) and cache is set to true so you can use the cache functions.
If there are rows, retrieve the data and assign them to the variable.
The last I suppose is like freeing the result.
I haven't used non-threaded for R33+ but I believe it's correct.
---
About the password, change the type to VARCHAR and length 129 in the table structure. Make sure that pPass has a size of 129 in your enum.
When registering and inserting the password, hash it (the size must be 129 in WP_Hash too) and insert it as a string.
When loading as dusk said, you need to use cache_get_row but as it's enum-array, you have to specify the length.
pawn Код:
cache_get_row(0, 0, PlayerInfo[playerid][pPass], 1, 129);