Re: DB resource as Session var
| From: | Peter James | Date: | Tue, 29 Jul 2003 19:55:02 +0000 |
| Subject: | Re: DB resource as Session var | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157419@lists.php.net to get a copy of this message | ||
Not possible, for many reasons. Not the least of which is that db servers,
like any server, only have a limited number of connections. Can you imagine
the havoc that multiple, session-wide, open connections would do to a db
server - even under light load?
Oh ya, plus it's absolutely impossible to persist any type of resource from
one request to the next.
Cheers,
Pete.
--
Peter James
petej@phparch.com
php|architect
The Magazine for PHP Professionals
http://www.phparch.com
----- Original Message -----
From: "Jackson Miller" <jackson@coldfeetcreative.com>
To: <php-general@lists.php.net>
Sent: Tuesday, July 29, 2003 1:39 PM
Subject: [PHP] DB resource as Session var
> I think I know the answer to this, but I have no technical reason to back
it
> up.
>
> Is it possible to store a db connection resource id as a $_SESSION
variable?
> It would be nice to have one connection per user/session that carries over
> multiple page views.
>
> I am guessing this is impossible, but if so I would like to know why.
>
> Thanks,
> -Jackson
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>