[Tutorial] Using MySQL R39 with Threaded Queries and Password Salting.
#1

Delete this. I'm going to re-write this with the updated version soon.
Reply
#2

There's another method aswell, but I wrote this one because mysql_function_query suits properly for me.
Reply
#3

Too much outdated stuff. This isn't worth the 'R39' mentioning.
  • mysql_function_query and OnQueryFinish are outdated. Use mysql_tquery or mysql_pquery instead.
  • Using cache_get_row_count is also over cache_get_data since most of the time you don't care about the fields.
  • using strval or floatstr is unnecesarry since you have *_int and *_float functions.
  • getting fields by name is slower than field index
  • cache_get_row_count returns the row count directly, rather than by reference, which makes for easy looping:
    pawn Code:
    for(new i, j = cache_get_row_count(); i < j; i++)
Lastly, this tutorial seems to be a mix from different scripts. One time you're using g_handle, then you're using Pipeline.
Reply
#4

Quote:
Originally Posted by Vince
View Post
Too much outdated stuff. This isn't worth the 'R39' mentioning.
  • mysql_function_query and OnQueryFinish are outdated. Use mysql_tquery or mysql_pquery instead.
  • Using cache_get_row_count is also over cache_get_data since most of the time you don't care about the fields.
  • using strval or floatstr is unnecesarry since you have *_int and *_float functions.
  • getting fields by name is slower than field index
  • cache_get_row_count returns the row count directly, rather than by reference, which makes for easy looping:
    pawn Code:
    for(new i, j = cache_get_row_count(); i < j; i++)
Lastly, this tutorial seems to be a mix from different scripts. One time you're using g_handle, then you're using Pipeline.
Exactly Vince, I've told him on skype seems like he ignored my suggestions, there are a lot of things that can be improved in here.

for example, copying a string from an array to another array, you can use strcat instead of using format

Here is some of our Skype conversation that I find his replies are rude.

Code:
[17:30:50 | Edited 17:30:54] pds2k12: cache_get_field_content(0, "PositionZ", tmp);
PlayerInfo[extraid][PositionZ] = floatstr(tmp);
cache_get_field_content_float same as the int
[17:30:57] pds2k12: no need converting
[17:31:47] [Unkown].: bruh, ik
[17:31:58] [Unkown].: thats how i like
[17:32:01] pds2k12: why use the longer pattern when it can be done easily
[17:32:04] [Unkown].: i dont like
[17:32:07 | Edited 17:32:09] pds2k12: well urs is slower no offence
Code:
[17:39:15 | Edited 17:39:16] pds2k12: basically you're going down instead of going up
[17:39:20 | Edited 17:39:28] pds2k12: well they do the same thing! mysql_query doesn't need thread definition
[17:39:21] [Unkown].: how so
[17:41:02] [Unkown].: still i don't like how mysql_tquery
[17:41:04] [Unkown].: like if i see it
[17:41:05] [Unkown].: i don't like it
[17:41:11] [Unkown].: i find mysql_func_query stable for me
[17:41:15] [Unkown].: i can't disagree that tquery
[17:41:16] [Unkown].: is better
[17:41:20] [Unkown].: because i've used it before
[17:41:33] [Unkown].: oh, and also
[17:41:37] [Unkown].: #define mysql_function_query
[17:41:41] [Unkown].: is a _tquery marco
[17:41:42] [Unkown].: macro
[17:42:56] pds2k12: okay won't bother giving you suggestions, but expect a lot of critism
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)