PEAR::setErrorHandling conflicts with nextId() ?
| From: | Piotr Roszatycki | Date: | Thu, 30 Aug 2001 14:01:38 +0000 |
| Subject: | PEAR::setErrorHandling conflicts with nextId() ? | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-1722@lists.php.net to get a copy of this message | ||
PHP/4.0.6
PEAR/CVS snapshot
I've found $dbh->nextId() breaks setErrorHandling().
This script should print error, but it doesn't.
<?php
include "DB.php";
function db_error_handler(&$obj) {
print "*** {$obj->message} -- {$obj->userinfo}\n<br>";
die;
}
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, "db_error_handler");
$db = new DB;
$dbh =
@$db->connect("pgsql://www:opelcorsa1200@uranus.internetia.com/top");
if ($db->isError($dbh)) {
var_dump($dbh); die;
}
$id = $dbh->nextId("service");
print $id;
$dbh->simpleQuery("SYNTAX ERROR");
?>
--
Piotr Roszatycki, Netia Telekom S.A. .''`.
mailto:Piotr_Roszatycki@netia.net.pl
: :' :
mailto:dexter@debian.org
. '
`-