Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: DBH Insert of Binary Data

by cowboy (Friar)
on Mar 19, 2005 at 03:13 UTC ( [id://440860]=note: print w/replies, xml ) Need Help??


in reply to Re: DBH Insert of Binary Data
in thread DBH Insert of Binary Data

Placeholders, are the way to go in mysql. In postgres (DBD::pg) you explicitly need to do something like:
my $sth = $dbh->prepare("INSERT INTO foo (blob) VALUES (?)"); $sth->bind_param(1, $blob_data, { pg_type => DBD::Pg::PG_BYTEA });
This is a pain in the ass, I wish postgres would just let placeholders work with binary magically like mysql does.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://440860]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-28 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found