Jump to content

mysql_free_result()


echo_loser

Recommended Posts

I am new to the whole PHP/MySQL thing and I had a question on database performance:

 

After I connect to the database and do a SELECT statement on a table, what is the proper way to handle closing and/or freeing memory.

 

Currently, in the book I am following, the ONLY thing that they do is a mysql_free_result() after they are done extracting the info from the table into variables. They say that although it is usually only used when expecting LARGE returns, it should be used consistently to mark the end of needing that result set.

 

I was wondering is mysql_free_result() enough? Or is there something else I should be doing like closing the database with a die() or something?

Link to comment
https://forums.phpfreaks.com/topic/255746-mysql_free_result/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.