RE: [PHP] 2 x DB connections at once
| From: | Donald Tyler | Date: | Thu, 22 Jan 2004 21:47:37 +0000 |
| Subject: | RE: [PHP] 2 x DB connections at once | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175468@lists.php.net to get a copy of this message | ||
OK, now I have done some work and it gets even stranger.
Two Objects
Validator
Importer
Both objects have private variables called $this->Connection
However, when I change the DB for one objects connection pointer, the other
objects connection pointer ALSO changes DB.
Is it not possible to have two completely separate DB connections active at
the same time?
-----Original Message-----
From: Donald Tyler [mailto:chekote69@hotmail.com]
Sent: Thursday, January 22, 2004 3:08 PM
To: php-general@lists.php.net
Subject: [PHP] 2 x DB connections at once
I thought this was possible, but it doesn't seem to be working:
I have a class, that has a private variable called $this->Connection, which
is a Database Connection pointer to a MySQL database. During the lifetime of
the Class, it uses the connection multiple times without a problem.
The class also uses a function from an include file that has its OWN
Database Connection pointer. And it seems that for some reason, as soon as
that external function is called, the Private Database Pointer within my
Class suddenly points to the Database name that the external functions
Database Pointer was using.
I ALWAYS specify which connection pointer I want to use when selecting the
DB and doing a mysql_query, so I have no earthly idea how the external
Connection pointer is affecting my Private Connection Pointer.
I hope I explained that well enough; it's real difficult to put into words.
Does anyone have any idea what might be happening?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php