On Mon, 26 Jul 2004 12:18:37 -0500 (CDT), Rodolfo Gonzalez Gonzalez
<[EMAIL PROTECTED]> wrote:
> 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?.
>
> <?php
> // Create a valid DB object named $db
> // at the beginning of your program...
> require_once 'DB.php';
>
> $db =& DB::connect('mysqli://prueba:[EMAIL PROTECTED]: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
>
Echo $res->getUserInfo() as well. It has the real error.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php