in reply to Performing substitutions in MySQL
UPDATE my_table SET imageurl = CONCAT( LEFT(imageurl, LENGTH(imageurl) - INDEX( imageurl, '.jpg') ) ,'.gif'\ ) [download]
You'll have to play with it to make sure there isn't an off-by-one error.
My wife's blog