Closing MySQL querys?
#1

Hi, I was wondering if there is a way of closing the querys which are used by "mysql_query"?

Thanks.
Reply
#2

Closing the queries? What do you mean?
Reply
#3

Freeing results or something, the server load is always high with MySQL stuff
Reply
#4

Yes, that is why I am wanting to do something with my querys.
Reply
#5

Make like this:

pawn Код:
mysql_query("bla bla...");
mysql_store_result();
//Other stuff
mysql_free_result();
Reply
#6

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!
Reply
#7

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).
Reply
#8

How can I thread queries? I have never thought about that.

Thanks to Redgie & Markx, its worked.
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)