NYCPHP Meetup

NYPHP.org

[nycphp-talk] When to close a mysql connection

tedd tedd at sperling.com
Sun Jul 1 23:21:20 EDT 2007


At 2:17 PM -0400 7/1/07, Warren Myers wrote:
>It should also be noted that connections will automatically timeout, 
>so you don't technically need to close it (though it's a Good Idea 
>(tm)).

As for me, I always close doors after I travel through them -- just a 
force of habit. I don't open files, take what I need and then not 
close them. Likewise, I don't open a dB without also closing it after 
I get what I need. I may do that several times in a single script and 
I know there is a bit of overhead cost in doing that, but always 
knowing that I closed the door means something to me. Besides, 
computers are getting faster than I can adapt anyway, so I'll keep my 
old habit.

Cheers,

tedd

-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list