Posts: 351
Threads: 54
Joined: Apr 2010
Q1: Do I need to use mysql_free_result() to trash unused data or I can work without it and server will trash it(so server won't use too many rams).
Q2: Do I need to use it only when selecting data or when I'm updating/inserting data 2?
Thank you!
Posts: 815
Threads: 65
Joined: May 2010
29.07.2011, 19:03
(
Last edited by Snipa; 29/07/2011 at 08:02 PM.
)
If you mysql_store_result, you need to mysql_clear_result.
So yes, for selecting. Not needed for updating
I accidently forgot to mysql_free_result, and it eventually crashed the server..
Posts: 21
Threads: 2
Joined: Feb 2011
Reputation:
0
Exactly, when you store data, you have to clear it eventually. By updating, inserting or deleting data you don't store any data in the server.
Posts: 564
Threads: 149
Joined: Jan 2011
Reputation:
0
When you store it, it wont store any date from the server.
Posts: 351
Threads: 54
Joined: Apr 2010
Quote:
Originally Posted by Mean
pawn Code:
mysql_query( "SELECT * FROM lol WHERE rofl = 'lmao'" ); mysql_store_result( ); // Do all the code here. // After we are done, we do: mysql_free_result( );
Also, only when selecting data, actually only when using mysql_store_result( ).
|
Hmm, alright.
I did it, now it uses about 100 rams less, but sill by the time it jumps and in about 10 hours it gets to 350 again :/
I'll think of something.
Thank you all very much!
PS. to mean - OMG, kojom brzinom ti skupljas postove ^_^