Re: PEAR with multiple databases
| From: | Valerio Santinelli | Date: | Mon, 04 Mar 2002 07:40:30 +0000 |
| Subject: | Re: PEAR with multiple databases | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-929@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Tomas V.V.Cox" <cox@idecnet.com>
> Valerio Santinelli wrote:
> >
> > I am trying to use more than one DB connection in the same script, but
I'm experienceing every kind of problems.
> > By default I'm connected to my application's main database, but at a
certain point I need to fetch some data from a different database.
> > What I am doing is instantiating a new DB connection through
DB::connect() passing as parameter the new DSN.
> > At this point I can do all my operations on the new db, but my old
connection gets transferred to the new one and I can no longer access the
first db.
>
> PHP normally uses the same connection if the same access data is
> provided (user, pass and host) and that is a problem when you need
> access to two or more databases in the same backend. This problem should
> be solved for MySQL, I'm not sure on others. What database are you
> using?
I am using MySQL v3.23.42
And the problem exists.
--
Valerio Santinelli
Digisoft Multimedia s.r.l.
http://www.digisoft-multimedia.it/