Jump to content

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

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.