About threaded 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: About threaded queries. (
/showthread.php?tid=493629)
About threaded queries. -
audriuxxx - 09.02.2014
Hi,
If i sent two queries in one time for ex:
Код:
mysql_tquery("UPDATE players ....");
mysql_tquery("SELECT * FROM players ... ");
Then the query where is 'Update players' will be first completed? and then other query, 'Select * From players'? But it's possible, due lagg or something, the second query will be finished first, and then first query? it's important for my because, i want to update something, and then load that information, what was updated.
Re: About threaded queries. -
Vince - 09.02.2014
Yes, they can be executed out of order. This is known as a race condition. Create a callback for the UPDATE query and execute the SELECT there.