Re: Proper procedure to close mysql queries!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



JeRRy wrote:
Hi Chris,
Thanks for that, always wondered. So what does just using '?>' do than? Must close eventually but I am guessing by using that as a close the connection times out after a set period of time and the 'pid' is killed, correct?

If you're using mysql_connect php will close the connection when the script itself stops (through an exit(), die() or it just completes normally) as part of it's shutdown procedures (memory cleanups, garbage collection etc etc).

If you're using persistent connections (mysql_pconnect) it leaves the connection open for the next process to use, so it lowers the connection overhead. However it can have other side-effects (see http://www.php.net/mysql_pconnect for further info).

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux