Re: DB: you can catch connection errors but can you catch SQL errors? (trying to ctach "DB Error: no such field")
| From: | Justin Patrin | Date: | Thu, 07 Apr 2005 17:39:16 +0000 |
| Subject: | Re: DB: you can catch connection errors but can you catch SQL errors? (trying to ctach "DB Error: no such field") | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18634@lists.php.net to get a copy of this message | ||
On Apr 7, 2005 10:29 AM, l Burnerheimerton <lburnerheimerton@yahoo.com> wrote:
> I am trying to catch the error "DB Error: no such
> field".
>
> I have:
>
> $db->setErrorHandling(PEAR_ERROR_CALLBACK, 'db_err');
>
> that catches all connection errors but I need to catch
> SQL errors as well.
>
> ANy ideas/examples?
>
That *should* work just fine. If it doesn't, try using
PEAR::setErrorHandling() instead.
--
Justin Patrin