2008年8月22日星期五

Re: [fw-db] How to properly close database connection after query?

Conrad Taylor wrote:
>
> Hi, what's the proper way to close a connection using ZF after query?
>

Most people don't bother to close the database connection. Since PHP cleans
up all resources at the end of handling the current request, the db
connection will be closed automatically at that time.

If you have a long-lived PHP script, not a web app, you might find it
necessary to clean up resources before the termination of the script (but
again, when the script terminates it will close connections). If this
applies to you, you can use the closeConnection() method as you described.

Regards,
Bill Karwin
--
View this message in context: http://www.nabble.com/How-to-properly-close-database-connection-after-query--tp19101651p19111742.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: