12/9/2005
MySQL String Function Concat
MySQL CONCAT concatenates (ie. puts together as one) strings.
For example, we have a column with photo file names all missing the extension (my_photo_name instead of my_photo_name.jpg). To update all rows in the column with the .jpg extension, execute the following query:
UPDATE items
SET mainphoto = CONCAT(mainphoto, ‘.jpg’);
SET mainphoto = CONCAT(mainphoto, ‘.jpg’);
Popularity: 16%


