mysql_connect connection lifetime
-
06-07-2019 - |
Question
What happes when the script that made @mysql_connect($server, $user, $password)
dies?
How long does it live?
Thank you!
Solution
Connections opened by mysql_connect() are closed at script exit, unless closed earlier by calls to mysql_close().
OTHER TIPS
It will close when your script ends, but it's better practice to close it explicitly using mysql_close()
- releasing the link when you don't need it.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow