Easiest way to convert. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Easiest way to convert. (
/showthread.php?tid=608477)
Easiest way to convert. -
RedCounty - 01.06.2016
MySQL R5 to MySQL R39? Any help appreciated.
Re: Easiest way to convert. -
SickAttack - 01.06.2016
Go through the whole script and update it using the new functions/syntax's.
Re: Easiest way to convert. -
RedCounty - 01.06.2016
Quote:
Originally Posted by SickAttack
Go through the whole script and update it using the new functions/syntax's.
|
Is that the only way? Is there a quicker way to convert for instance:
mysql_query
to the new mysql_pquery?
Then the ones with mysql_store_result() - They need to be put into a separate function, or?
I have used MySQL R39 + and I'm very aware of it, I've never converted a script to it, though.
Re: Easiest way to convert. -
Misiur - 01.06.2016
If you want to leverage theaded query speed, then yes, there's no other way than creating proper callbacks. That isn't too hard tho, it can be even easier to do with y_inline. And there are quite a few functions to change, such as mysql_num_rows to cache_num_rows/cache_get_row_count
Re: Easiest way to convert. -
RedCounty - 01.06.2016
Quote:
Originally Posted by Misiur
If you want to leverage theaded query speed, then yes, there's no other way than creating proper callbacks. That isn't too hard tho, it can be even easier to do with y_inline. And there are quite a few functions to change, such as mysql_num_rows to cache_num_rows/cache_get_row_count
|
Thank you for the heads up.
The best way to start would be to do the ones where it's "mysql_store_result" as they're the ones which use the most functions, where as "mysql_query" which don't require a callback to fetch data, such as "UPDATE XXX SET XXX=XXX WHERE XXX=XXX LIMIT 1"
They don't need a callback for it, so it'll be a simple case of converting "mysql_query" to "mysql_pquery" without any extra added sections on it, right?
Thanks for all of your help so far guys.
Re: Easiest way to convert. -
Misiur - 01.06.2016
Yup, just
pawn Код:
mysql_pquery(handle, query);
Re: Easiest way to convert. -
RedCounty - 01.06.2016
Awesome mate. Thank you so much.