Closing MySQL querys? - 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: Closing MySQL querys? (
/showthread.php?tid=286043)
Closing MySQL querys? -
Luis- - 26.09.2011
Hi, I was wondering if there is a way of closing the querys which are used by "mysql_query"?
Thanks.
Re: Closing MySQL querys? -
AndreT - 26.09.2011
Closing the queries? What do you mean?
Re: Closing MySQL querys? -
linuxthefish - 26.09.2011
Freeing results or something, the server load is always high with MySQL stuff
Re: Closing MySQL querys? -
Luis- - 26.09.2011
Yes, that is why I am wanting to do something with my querys.
Re: Closing MySQL querys? -
Markx - 26.09.2011
Make like this:
pawn Код:
mysql_query("bla bla...");
mysql_store_result();
//Other stuff
mysql_free_result();
Re: Closing MySQL querys? -
Redgie - 26.09.2011
Whatever MySQL plugin you are using will have a function along the lines of mysql_free_result to be executed after a query that produces a result has ran.
EDIT: Beaten, stupid 120 second post limit!
Re: Closing MySQL querys? -
playbox12 - 26.09.2011
I'm not entirely sure what you mean with closing a mysql query, however as suggested above you can free the result after you're done, and you definitly should do that. Though I'm not sure what you're talking about with high loads on the server, I never had that. (always thread your queries too).
Re: Closing MySQL querys? -
Luis- - 26.09.2011
How can I thread queries? I have never thought about that.
Thanks to Redgie & Markx, its worked.
Re: Closing MySQL querys? -
AndreT - 26.09.2011
Quote:
Originally Posted by -Luis
Thanks to Redgie & Markx, its worked.
|
I'd assume an error 2014 would come up with either plugin - BlueG's or Stricken's...
For threading: there's a huge amount of related questions and relatively even a bigger amount of tips/hints/answers on threading. Besides wikis for each plugin provide good examples.