scarhand Posted March 10, 2010 Share Posted March 10, 2010 Is this function required if you create a new connection right after another one? Or will the new connection simply replace the old one? Link to comment https://forums.phpfreaks.com/topic/194716-question-about-mysql_close/ Share on other sites More sharing options...
darkagn Posted March 10, 2010 Share Posted March 10, 2010 If you call mysql_connect with the same parameters and the new_link parameter set to false, then the connection is reused, that is another reference to the same connection is returned. The only time you need to call mysql_close() is when you need to free up some memory for some other memory-intensive task. There is no need to call it if you are just going to open another connection, all connections are freed once the script finishes its execution. Link to comment https://forums.phpfreaks.com/topic/194716-question-about-mysql_close/#findComment-1024021 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.