On Sep 30, 2005, at 11:51 AM, Larry E. Ullman wrote:
I had this problem a while ago, when you try to create the second
connection
to the database with the same login credentials, i.e username and
password.
If mysql / php detect there is a connection already established
with those
details
I had this problem a while ago, when you try to create the second
connection
to the database with the same login credentials, i.e username and
password.
If mysql / php detect there is a connection already established
with those
details it will return that specfic resouce and not create an ne
t; -Original Message-
> From: Micah Stevens [mailto:[EMAIL PROTECTED]
> Sent: Jueves, 29 de Septiembre de 2005 01:10 p.m.
> To: [email protected]
> Subject: Re: [PHP-DB] Connecting to two MySQL databases
>
>
> I don't see a reason to duplicate the class code, just make
I agree with this solution!!
-Original Message-
From: Micah Stevens [mailto:[EMAIL PROTECTED]
Sent: Jueves, 29 de Septiembre de 2005 01:10 p.m.
To: [email protected]
Subject: Re: [PHP-DB] Connecting to two MySQL databases
I don't see a reason to duplicate the class code, just
Well, the class creation I screwed up on, but I think you should get the idea
anyhow.
-Micah
On Thursday 29 September 2005 11:10 am, Micah Stevens wrote:
> I don't see a reason to duplicate the class code, just make it keep track
> of the $link variable, and each instance of the class can be a
I am working on an application that requires me to connect to two
MySQL databases both hosted on the same server.
I have an existing set of class files I created to handle the db
connection to the main database. To connect to the second database,
I duplicated my db class files and renamed t
I don't see a reason to duplicate the class code, just make it keep track of
the $link variable, and each instance of the class can be a seperate
connection.. Then you can do what you want:
$db1 = new dbconn;
$db2 = new dbconn;
$db1->dbconn($host, $user, $pw);
$db2->dbconn($host2, $user2, $pw2)