CartMetrix - Do you know yours?

« MySQL String Functions | Home | Using Subselect To Find Missing Rows »

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’);

Popularity: 16%

Trackback:

Related Posts

Post your opinion

Verification Image

Please type the letters you see in the picture.

Subscribe without commenting


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It