On Wed, Oct 08, 2003 at 09:48:56AM -0700, David Wheeler wrote:
> On Wednesday, October 8, 2003, at 08:55 AM, Ragnar Hojland Espinosa
> wrote:
>
> >
> >Hi David, hm.... i thought i had mentioned it too.. but that doesnt
> >work either:
> >
> >my $sth = $dbh->prepare ("INSERT INTO emails (id, fromhdr, subjecthdr,
> >datehdr, wholemessage, plaintext) VALUES (?, ?, ?, ?, ?, ?);") || die
> >"$|";
> >
> >$sth->bind_param (5, $wholemessage, { pg_type => DBD::Pg::PG_BYTEA });
> >
> >$sth->execute ($id, $from, $subject, $date, $wholemessage,
> >$plain_text->string) || die "$|";
>
> That's because you're binding it twice. You need to bind each argument
> with bind_param(), and then call execute() without any arguments.
Actually that error was the result of not including a
use DBD::Pg;
Thanks for getting me on the right track
--
Ragnar Hojland - Project Manager
Linalco "Specialists in Linux and Free Software"
http://www.linalco.com Tel: +34-91-5970074 Fax: +34-91-5970083