Re: DB_Common::autoExecute() & PostgreSQL
| From: | Justin Patrin | Date: | Fri, 10 Dec 2004 20:11:41 +0000 |
| Subject: | Re: DB_Common::autoExecute() & PostgreSQL | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16174@lists.php.net to get a copy of this message | ||
On Sat, 11 Dec 2004 03:38:36 +0800, Muhyiddin A.M Hayat
<middink@indo.net.id> wrote:
> thanks, that errors is " Bad input string for type bytea", so how to insert
> bytea field using DB_Common::autoExecute() ?
That I don't know. ;-) But at least you have something to Google now.
>
>
> ----- Original Message -----
> From: "Justin Patrin" <papercrane@gmail.com>
> To: "Muhyiddin A.M Hayat" <middink@indo.net.id>
> Cc: <pear-general@lists.php.net>
> Sent: Saturday, December 11, 2004 2:53 AM
> Subject: Re: [PEAR] DB_Common::autoExecute() & PostgreSQL
>
> > On Wed, 8 Dec 2004 23:04:15 +0800, Muhyiddin A.M Hayat
> > <middink@indo.net.id> wrote:
> >> Dear All,
> >>
> >> I would like to update bytea field using DB_Common::autoExecute(), but
> >> that result is errors (DB Error: unknown error)
> >> my source:
> >>
> >> $fields_values['foto']
> >>
> >> =pg_escape_bytea(file_get_contents($_FILES['filePicture']['tmp_name']));
> >>
> >> $result = $db->autoExecute('mytable', $fields_values,
> >> DB_AUTOQUERY_UPDATE, 'id ='.$arg[1]);
> >> if (DB::isError($result)) {
> >> die ($result->getMessage());
> >
> > Add $result->getUserInfo() to this to get the *real* error.
> >
> >> }
> >>
> >> but when i using MySQL, there is no error.
> >>
> >> How to fix?
> >>
> >
> > --
> > Justin Patrin
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--
Justin Patrin