Jump to content

persistent mysql database connection


samona

Recommended Posts

Thanks for the response.

 

I want to create a login system using a mysql database instead of the default filesystem.  I'm just wondering if its better to tear down the connection after each page and rebuild it on the next one. 

 

Also,I want to use object so I'm wondering if I should serialize those object or just store the values in the database and query them using the saved session value.

Persistent database connections cannot be 'saved'. You must still call the code on every page to get one of the existing persistent connections or to create a new persistent connection if an existing one is not available.

 

Edit, Also, persistent connections only work on a very few web server/php configurations and in only the latest php versions.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.