NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP and MySQL Connections

Daniel Convissor danielc at analysisandsolutions.com
Mon Apr 14 11:13:14 EDT 2008


Hi Randal:

On Fri, Apr 11, 2008 at 06:51:34AM -0400, Randal Rust wrote:
> My understanding is that PHP automatically cleans up a database
> connection after it has executed the query. Therefore, I don't need to
> use the close() function. Is that correct?

No.  close() is called during PHP's cleanup process that happens at the 
end of script execution.


> One thing I'd like to be able to do is check how many
> connections have physically been made to the database.

Do you mean "SHOW [FULL] PROCESSLIST" or "SHOW [GLOBAL | SESSION] 
STATUS"?

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list