Re: DB_DataObject: database error code
| From: | Laszlo Hermann | Date: | Tue, 19 Jul 2005 06:19:04 +0000 |
| Subject: | Re: DB_DataObject: database error code | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20052@lists.php.net to get a copy of this message | ||
I would like to process the error IN THE SCRIPT. i.e., when the error
code is 1062 the script should display a message like "hey dude,
duplicate entry!" Is there a way to do this?
On 7/19/05, Alan Knowles <alan@akbkhome.com> wrote:
> On Mon, 2005-07-18 at 13:47 +0300, Laszlo Hermann wrote:
> > Dear ...,
> >
> > Is there a way to see what error code did the sql server return? (for
> > example msyql returns 1062 for duplicate entries)
> >
> > I'm talking about DB_DataObject.
> turn debugging on... or print_r() the dataobject, it's one of the
> variables.. (there may also be a method for retrieving it, but I cant
> remember of the top of my head)
>
> Regards
> Alan
> >
> > Thanks,
> >
> > Laszlo.
>
>