Re: [PHP-PEAR] troubles with db classes
[email protected] ("Tomas V.V.Cox") Mon, 12 Mar 2001 21:57:39 +0100
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
Burak DAYIOGLU wrote:
>
> There is still the issue with resultset handles. When numrows e.g. is
> given a handle which doesn't point to a real handle, it gives an error
> with no descriptive information. I was suggesting the addition of
> detailed error description for this.
>
Errors in pearDB are handled by a portable errors systems, they are
messages like: "no dabase" or "unknown error". If you want a more
specific error consult the debuginfo attached with the error. For ex:
if (DB::isError($res = $db->query($sql))){
die ($res->getDebugInfo());
}
The getDebugInfo method from Pear Error Class, should contain the last
query and also the native backend error (see common.php->raiseError()).
Tomas V.V.Cox