..Also found this in the Docs (perldoc DBI, search for binary)
Perl supports binary data in Perl strings, and the DBI will pass
binary
data to and from the driver without change. It is up to the
driver
implementors to decide how they wish to handle such binary data.
On Mo
..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=
Andy Hassall wrote:
The general approach is to always use placeholders, and never directly
interpolate values into SQL statements. This should insulate you from
whatever encoding's needed. Constants in SQL are OK, but if you're putting
encoding as in quote()ing or encoding as in prepare/execute
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
> -Original Message-
> From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2004 20:18
> To: [EMAIL PROTECTED]
> Subject: Re: using binary data in variable in an
> INSERT/UPDATE s
Scott T. Hildreth wrote:
I guess it would depend on which database you are using. I would try
Good point :)
I'm thinking MySQL, since this specific app will use MySQL excusively...
it with a bind column and let the DBD driver handle the quoting if need
be,
I'm really hoping MySQL will work
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
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");
..