Re: MySQL close connection, what's the purpose?
| From: | John Nichel | Date: | Sun, 02 Apr 2006 03:40:40 +0000 |
| Subject: | Re: MySQL close connection, what's the purpose? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233082@lists.php.net to get a copy of this message | ||
Jasper Bryant-Greene wrote:
<snip>
I never close connections; PHP does that for me and has never caused any problems doing that. I don't see it as sloppy programming, it is a documented feature that PHP closes resources such as database connections at the end of the script.It's extremely sloppy programming. You're assuming that a) PHP will continue to be a forgiving language when it comes to items like this and b) your script is going to exit normally. The reason this is a 'documented feature' is because PHP is trying to make up for sloppy programming. You shouldn't rely on the language to clean up your toys for you. -- By-Tor.com ...it's all about the Rush http://www.by-tor.com