PEAR::DB - two simultaneous connections - bugs?

From: Date: Fri, 27 Jun 2003 07:34:16 +0000
Subject: PEAR::DB - two simultaneous connections - bugs?
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17776@lists.php.net to get a copy of this message
Hi. I'm trying to connect to 2 databases at the same time. I have something like that: $DB1 = DB::connect($dsn1,false); $DB2 = DB::connect($dsn2,false); $result1 = $DB1->query($sql1); $result2 = $DB2->query($sql2); Now, $result1 is a PEAR Error: db_error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => -18 [message] => DB Error: no such table [userinfo] => select sth_id from sth_table [nativecode=Table 'database2.sth_table' doesn't exist] [callback] => ) So, $DB1 is connected to database2. Why? I use MySQL. Connect function is in file DB/mysql.php in line 118 $conn = @$connect_function($dbhost, $user, $pw); I changed it into: $conn = @$connect_function($dbhost, $user, $pw, true); 'true' means 'make new resource' - but it hasn't helped. Some suggestions? Regards, Maciek

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