DB_mysql and multiple conections
| From: | Tomas V.V.Cox | Date: | Wed, 05 Sep 2001 10:35:58 +0000 |
| Subject: | DB_mysql and multiple conections | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-1809@lists.php.net to get a copy of this message | ||
Hi,
Max Holman <max@blueroo.net>, sent me a patch to solve the problem with
Pear and Mysql when using multiple conections in the same script. His
description of the problem:
"Using the MySQL PEAR DB classes, it is not possible to use 2 different
databases within the same script, unless the Hostname and/or password to
connect to each database are completely different.
I have implement a fix, which uses mysql_db_query() instead, and
DB_mysql
now holds the database name within itsself.
diff output is avaiable at
http://www.blueroo.net/pear/DB/mysql030901.diff
However, I am unsure how to handle the detection of
'DB_ERROR_NODBSELECTED'
in this instance
Hope this helps"
I couldn't apply his patch but adapt it to the last mysql.php release. I
ran "make test" and had no problems. Please let me know if someone have
problems with this patch, before commit it.
Tomas V.V.Cox