Timeline for Database connection in constructor and destructor
Current License: CC BY-SA 2.5
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 19, 2011 at 21:22 | comment | added | Wade Tandy | You don't close the connection explicitly. It eventually gets closed by the php internals after a certain time has elapsed without use. This eliminates all of the overhead involved with repeatedly opening and closing connections, and allows individual page requests to be much faster. | |
Jan 19, 2011 at 21:19 | comment | added | Buddy Lindsey | I read about that, and it sounds very enticing. However, how do you close the connection? in the docs it says the mysql_close() doesn't work. Do you just rely on mysql server to close it when it has been inactive for so long. I'd like to know that once all the work is done that the connection is closed. | |
Jan 19, 2011 at 21:12 | history | answered | Wade Tandy | CC BY-SA 2.5 |