List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:July 22 1999 7:57pm
Subject:Re: SV: Binary fields
View as plain text  
>DBD::mysql::st execute failed: parse error near
> 4â€
> at line 1 at line 54.
>Actually, I passing it like this
>insert into blah values ( '$pic' )
>where $pic has the binary contents....
>I have also tried converting all ' to \' in $pic, that doesn't help.

Don't do that.  Use the functions that are designed to make this problem
something you never have to think about.

use DBI;

... connect ...

my $sth = $dbh->prepare("insert into blah values (?)")
    or die "can't prepare query: ", $dbh->errstr;
    or die "can't execute query: ", $dbh->errstr;

Isn't that easy?

SV: Binary fieldsMartin Edelius22 Jul
  • Re: Binary fieldsFaisal Nasim22 Jul
  • Re: Binary fieldsBrian Huddleston22 Jul
  • Re: SV: Binary fieldsThimble Smith23 Jul