Question

What happes when the script that made @mysql_connect($server, $user, $password) dies?
How long does it live?

Thank you!

Was it helpful?

Solution

Connections opened by mysql_connect() are closed at script exit, unless closed earlier by calls to mysql_close().

http://www.phpdig.net/ref/rn41re774.html

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
scroll top