So adding mysql_free_result at the end of the script would be entirely pointless then right? Considering it will stop then regardless.
So instead I would put it right after I finish using the data from the result? Even on large result sets (what is "large" btw?) I don't see how it would help if it is being cleared at the end of the script regardless.
Thanks so very much, as you can tell i'm pretty new to PHP.
If your invocation of mysql_free_result() is the last line of your script, yes, it's redundant. If your script invokes the function right after it's done with the data, then it will do some good.
I know that if you have fetched multiple multigigabyte BLOBs from a database, you have probably fetched a large resultset. Beyond that, it's a term that is relative to your environment.
To be honest, I rarely use mysql_free_result(). As I can recall, the only time I use it is when I have multiple resultsets open at a time.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.