[ale] Append to the data in a BLOB in MySQL

Christopher Fowler cfowler at outpostsentinel.com
Tue Jan 30 22:52:38 EST 2007


I'm trying to append data to a blob in MySQL.  Normally I would do it
like this:

select content from file where file_id=?
content .= extra
update file set content = content where file_id=?

Now this can get slower and slower as the content gets bigger.

Is there a way I can simply append to the data?

I tried this:

update file set content=concat((select content from file where
file_id=?), extra) where file_id=?

MySQL gave me an error message on that one.





More information about the Ale mailing list