Jump to content

Recommended Posts

I'm creating a CMS for a friend who plans to have an estimated 10,000 or more people register accounts and at a minimum maintain around 1,000 online at a time.

I plan to store all of the user information in MySQL along with some other information and I was curious as to whether I should use mysql_free_result($query); at the end of the footer file used on every page to clear up all of the queries or not.

I was also wondering, would performace be an issue if I didn't? How much does mysql_free_result effect load times? What's the difference between unset($query) and mysql_free_result($query)? And lastly, should I unset all of my variables created on the page as well as free up the queries?

If anyone can provide some insight, thanks 8)
Link to comment
https://forums.phpfreaks.com/topic/14073-mysql_free_result-and-unset/
Share on other sites

If you, as you say, put it at the end of the file, then it is unnecessary as it is automaticly done at the end of the script execution. I have actually seen an example where a script without used less memory than one with mysql_free_result(). I do not think it is necessary to call this function.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.