[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Append to the data in a BLOB in MySQL
- Subject: [ale] Append to the data in a BLOB in MySQL
- From: cfowler at outpostsentinel.com (Christopher Fowler)
- Date: Tue, 30 Jan 2007 22:52:38 -0500
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.