Re: Re: DB_mysql and multiple conections

From: Date: Wed, 05 Sep 2001 22:54:44 +0000
Subject: Re: Re: DB_mysql and multiple conections
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1813@lists.php.net to get a copy of this message
Manuel Lemos wrote: > > Hello, > > "Tomas V.V.Cox" wrote: > > > > 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. > > That was the solution that Metabase adopted a long time ago, but since > PHP 4.0.6 a big ugly message is spit by PHP when you call that function > telling you that it is deprecated. The definitive solution in the > current Metabase version is to use mysql_select_database before each and > every query that accesses a specific database. > IMHO it's a little bit drastic to output those drecated statments. We have the same problem with the call_user_method in PEAR.php. Before, people could turn the messages off, but now is: change or change. People can not change so easy. Definetly the solution should be something like Manuel says. I'll do a patch for that. Thanks Manuel & John for the feedback, Tomas V.V.Cox

« previous php.pear.dev (#1813) next »