Max Campos wrote:
>
> Hello Everyone,
> I'm trying to find a way to insert information into a BLOB without
> using that function that reads in a file from the server (LOADFILE is
> it?). Some of the things i'll be inserting are larger than the maximum
> message size, so doing the whole thing via a single SQL statement isn't
> possible.
>
> Originally, I tried something like this:
>
> insert into test (prikey, myblob) values (1, "first piece here....");
>
> update test set myblob = CONCAT(myblob, "second piece here....") where
> prikey=1;
>
> ...but I quickly found that CONCAT seemingly doesn't handle blobs *at
> all*.
>
> Any ideas on how to do this??
The recommended way of inserting blobs is using the placeholders:
INSERT INTO foo VALUES (a, b, ?)
See "perldoc DBI" and the method bind_param for details.
However, that´s not supported from the MySQL C client, so it might
fail anyways.
Bye,
Jochen