..forgot to cc list.

On Mon, 2004-05-10 at 14:33, Scott T. Hildreth wrote:
> I guess it would depend on which database you are using.  I would try
> it with a bind column and let the DBD driver handle the quoting if need
> be, 
> 
> $dbh->do(q{
>     update mystuff set binaryfld=?
>     Where  id=1 
>     }, undef, $binary_data
> );
> 
> ..although you may have tell the driver that this is binary data,
> i.e binding a blob when using Oracle (ora_types)
> 
> Probably not to much help, but maybe a start,
> 
>                           STH
>  
> On Mon, 2004-05-10 at 14:18, JupiterHost.Net wrote:
> > Anyone ever do this before?
> > 
> > JupiterHost.Net wrote:
> > 
> > > Hello DBI folks!
> > > 
> > > If I have a column that is binary and data that is binary do I simply 
> > > $dbh->quote() it on an insert?
> > > 
> > > IE
> > > 
> > > my $binary_content = get_binary_stuff();
> > > 
> > > my $binary_content_Q = $dbh->quote($binary_content);
> > > 
> > > $dbh->do("UPDATE MyStuff SET BinaryGoodies=$binary_content_Q WHERE ID=1");
> > > 
> > > ...
> > > 
> > > Or do I need to convert it to hex  and then $dbh->quote() the hex 
> > > version (or not quote it)?
> > > 
> > > If I do need to make it hex first do I need to "unhex" it, after I 
> > > SELECT it into a variable, to get it into the original binary format?
> > > 
> > > (w/ pack()/unpack()??? which is a bit OT for this list...)
> > > 
> > > TIA
> > > 
> > > Lee.M - JupiterHost.Net
> > > 
> > > 
> > > 

Reply via email to