SA-MP Forums Archive
MySQL Scripting - 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: MySQL Scripting (/showthread.php?tid=442511)



MySQL Scripting - iFarrow - 07.06.2013

Could someone give me a couple of functions to save and load data in mysql and where to put them.


Re: MySQL Scripting - admantis - 07.06.2013

This is a very broad question... please read MySQL documentation (on it's website and on the main plugin thread) and read example scripts to understand how it works.


Re: MySQL Scripting - iFarrow - 07.06.2013

Quote:
Originally Posted by admantis
Посмотреть сообщение
This is a very broad question... please read MySQL documentation (on it's website and on the main plugin thread) and read example scripts to understand how it works.
I have but I don't know which methods work better.


Re: MySQL Scripting - Scenario - 07.06.2013

Download one of the various base-MySQL scripts available.


Re: MySQL Scripting - admantis - 07.06.2013

Quote:
Originally Posted by iFarrow
Посмотреть сообщение
I have but I don't know which methods work better.
Generally the "faster" method is using cache, this is available in every MySQL plugin apart from StrickenKid's and allows you to create threaded queries. PAWN is single-threaded, so every function is on a "queue" and one thing gets called at a time. If you have threaded queries, they will be executed in a separate background. This is why they are faster and more efficient.

AndreT wrote a very good tutorial explaining cache and threaded queries too, read it and try to puzzle it out!