mysql_free_result Q

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

mysql_free_result Q

Post by Calimero »

I read the manual about this function:

mysql_free_result()

And I'm interested - for how big queries does this makes sense using and is it just for number of rows or certain types of queries.

Gonna have a DB of 2 000 000 entries :D - so need some more info on this function.

Thanks in advance.
Breckenridge
Forum Commoner
Posts: 62
Joined: Thu Sep 09, 2004 11:10 pm
Location: Breckenridge, Colorado

Post by Breckenridge »

mysql_free_result() will free all memory associated with the result identifie. You only need to used it if you are concerned about how much memory is being used for queries that return large result sets.

Therefore, regardless of the size of your table, if your result is returning 10-20 rows then I don't think you have to use it.

if you do

Code: Select all

select * from table
and then let's say you put all the data into a text file then yes use mysql_free_result() after your script is done
Post Reply