DB connect object in session
| From: | Tom Rogie | Date: | Thu, 21 Jul 2005 09:59:34 +0000 |
| Subject: | DB connect object in session | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20088@lists.php.net to get a copy of this message | ||
Hello,
For a project with lots of database access, I planned to put the
DB:connect object into a session.
I only have one problem: before I start the session, the classes from
the project must be defined _and_ also the DB object must be connected (
DB::connect( $db ) ) else I get PHP incomplete class object errors.
So I cannot check the isset of my $_SESSION["db"] variable before I do
connect to the database... Means that I have to connect to the database
on every click?
Is there a way to keep using the same database object through the session?
Trogie