Re: Problem with PEAR DB & MySQLi

From: Date: Mon, 26 Jul 2004 18:59:55 +0000
Subject: Re: Problem with PEAR DB & MySQLi
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191905@lists.php.net to get a copy of this message
"Rodolfo Gonzalez Gonzalez" <rodolfo@equinoxe.g-networks.net> wrote in message news:Pine.LNX.4.58L0.0407261211280.30058@equinoxe.g-networks.net... > Hi, > > I'm trying to use PEAR's DB class with the new PHP 5 MySQLi support on > MySQL 4.1.3, using this example from the PEAR's docs (with my parameters > of course). I'm getting "DB unknown error" messages after the query. The > same query from the mysql client works fine, there are no connection > problems... anyone has tried PEAR with mysqli?. Hi, you should ask this on the PEAR general mailing list. Regards, Torsten Roehr > > <?php > // Create a valid DB object named $db > // at the beginning of your program... > require_once 'DB.php'; > > $db =& DB::connect('mysqli://prueba:clave@127.0.0.1:3306/mibase'); > if (DB::isError($db)) { > die($db->getMessage()); > } > > // Proceed with a query... > $res =& $db->query('SELECT * FROM users'); > > // Always check that result is not an error > if (DB::isError($res)) { > die($res->getMessage()); > } > ?> > > result: > > DB Error: unknown error > > > Regards, > Rodolfo.

« previous php.general (#191905) next »