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:[EMAIL PROTECTED] 
Sent: Thursday, January 22, 2004 3:08 PM
To: [EMAIL PROTECTED]
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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to