PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #1690

PEAR::DB no catch query() error ? @mysql

Details

Submitted2004-06-21 09:32 UTC
Fromdonyad at 126 dot com
StatusBogus
PackageDB
PHP Version4.3.7
OSWinXP
Roadmaps(Not assigned)

Comments

[2004-06-21 09:32 UTC] donyad at 126 dot com

Description:
------------
when i query a wrong sql at mysql
PEAR::DB do not report me sql error
just PHP report me the next function was undefined ...

the DB class just download today
DB-1[1].6.4.tgz

Reproduce code:
---------------
$dsn = 'mysql://root:root@localhost/my_database';
$options = array(
'debug' => 2,
'portability' => DB_PORTABILITY_ALL,
);
$db = DB::connect($dsn, $options);
if(DB::isError($db)){
die($db->getMessage());
}
$db->setFetchMode(DB_FETCHMODE_ASSOC);
$result = $db->query('select * from my_table where hide=0 order by time desc');
if(DB::isError($db)){
die($db->getMessage());
}
//my_table do not have time field
//this sql is error
//butPEAR() catch nothing ...

Expected result:
----------------
wish it act as phplib

[2004-06-22 04:23 UTC] donyad at 126 dot com

got it
3x very much