odisey Posted November 25, 2007 Share Posted November 25, 2007 What is the significance of mysql_close(); ? Is it important to always close the db? Link to comment https://forums.phpfreaks.com/topic/78741-solved-mysql_close/ Share on other sites More sharing options...
pocobueno1388 Posted November 25, 2007 Share Posted November 25, 2007 From the manuel Quote Using mysql_close() isn't usually necessary, as non-persistent open links are automatically closed at the end of the script's execution. Link to comment https://forums.phpfreaks.com/topic/78741-solved-mysql_close/#findComment-398501 Share on other sites More sharing options...
ToonMariner Posted November 25, 2007 Share Posted November 25, 2007 not really - it is good practice to do this kind of thing in your code though - laziness now can result in problems later!!!!!! if you are using multiple connections on a page then you shoudl manage them properly but essentially php runs this command at the end of every page (that is not utilizing mysql_pconnect). Link to comment https://forums.phpfreaks.com/topic/78741-solved-mysql_close/#findComment-398503 Share on other sites More sharing options...
odisey Posted November 25, 2007 Author Share Posted November 25, 2007 Quote not really - it is good practice to do this kind of thing in your code though - laziness now can result in problems later!!!!!! if you are using multiple connections on a page then you shoudl manage them properly but essentially php runs this command at the end of every page (that is not utilizing mysql_pconnect). Good to know... I have one connection only ... so it must close on its own.... Thank you for the feedback! And from the manuel! Marc Link to comment https://forums.phpfreaks.com/topic/78741-solved-mysql_close/#findComment-398505 Share on other sites More sharing options...
revraz Posted November 25, 2007 Share Posted November 25, 2007 If you open a door you close it. Link to comment https://forums.phpfreaks.com/topic/78741-solved-mysql_close/#findComment-398589 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.