Perl-Sensitive Sunglasses | |
PerlMonks |
Re: blob fieldby mortis (Pilgrim) |
on Aug 12, 2004 at 02:49 UTC ( [id://382152]=note: print w/replies, xml ) | Need Help?? |
Many DBD drivers support BLOB columns natively. Most drivers/databases require you to use bind variables (which are usualy safer and often more efficient than composing quoted strings of sql code). Using bind params is not that difficult, assuming you are using mysql, and have a table named foo 'create table foo (data BLOB)', the following contrived example code should work for you:
Iirc, DBD::Oracle supports blobs natively in the same manner (you might have to pass statement handle attributes to identify the column's type though). DBD::Pg also supports blob columns, though you need to have blob access inside of a transaction, and you used to have to call some Postgresql specific DBD api to use them. Newer versions may be better. hth, Kyle
In Section
Seekers of Perl Wisdom
|
|