Jump to content

php-mysql connection closes on it's own?


tkm

Recommended Posts

Hello Mates,

  This is basic query. I have read from php.net manual that mysql automatically destroys a connection with php after the script executes. Also a forum member suggested that it is safer to have many opened connection rather than having unnecessary close resource connection code. Can anyone be kind enough to share his/her views on this? I have this php script from where I do open a lot of connections to mysql and only close it while the application logout (I understand mysql just opens one connection for one source in normal scenerio). Is this the worst possible approach? Can I just trust on my hosting ISP's mysql configuration setting that the connections will be closed automatically, provided they have that setting? Any suggestions would be a great help. Thank you.

Link to comment
https://forums.phpfreaks.com/topic/104531-php-mysql-connection-closes-on-its-own/
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.