LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / When is the DB connection closed?
Posted:  29 Jul 2014 07:14

I have a question related to the MySQL connection. It is opened when we call "dbConnect()" (in toolbox.php) but I didn't find where it is closed. Any ideas about that?

Thanks heaps!! thump_up
Posted:  29 Jul 2014 12:52
Hi there,

Correct; there is no explicit close statement. The calendar uses a non-persistent db connection and non-persistent connections are closed automatically by PHP when the script's execution ends.

Quote from the PHP manual:


Using mysql_close() isn't usually necessary, as non-persistent open links are automatically closed at the end of the script's execution.

Of course, if you prefer, you can close the MySQL database, once not needed anymore, by a mysql_close statement.

Posted:  29 Jul 2014 23:49
Thanks heaps Roel for your help thump_up