Generating MySQL UPDATE statements containing BLOB image data
- by Bob
I'm trying to write an SQL statement that will generate an SQL script that will update a BLOB field with an IMAGE being selected from the database.
This is what I have:
select concat( 'UPDATE `IMAGE` SET THUMBNAIL = ',
QUOTE( THUMBNAIL ),
' WHERE ID = ', ID, ';' ) as UPDATE_STATEMENT
from IMAGE;
In the above,…