mysql_free_result()
#1

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

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

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

When you store it, it wont store any date from the server.
Reply
#5

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

Quote:
Originally Posted by Mean
View Post
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 ^_^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)