SA-MP Forums Archive
Global Variables vs mysql queries - 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: Global Variables vs mysql queries (/showthread.php?tid=657970)



Global Variables vs mysql queries - Seifspeed - 19.08.2018

Hello everyone!
I want to know is there a specific advantage to using global variables instead of executing a mysql query everytime I need data from my database?
I know mysql can handle all those requests and I hate having to update my global variable and also update the database, it's like I am doing a task twice. I really want to know peoples arguments before I decide to switch totally to one or the other.
Thanks in advance.


Re: Global Variables vs mysql queries - Calisthenics - 19.08.2018

When data need to be accessed very frequently, use global variables.