>DBD::mysql::st execute failed: parse error near
>'\'ÃÂ[èi)ßÃÂÃÅ¡TÃÅBTU÷zñûG6(Z8ÃâÃÅ¡ÃÅiÃ
> 4ââ¬
>Ã
½Ãâº-ñ$2ÃâºmçhCaýèÃâ â2'
> at line 1 at test.pl 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;
$sth->execute($pic)
or die "can't execute query: ", $dbh->errstr;
Isn't that easy?
Tim