Jump to content

Archived

This topic is now archived and is closed to further replies.

coolispaul

adding a string to data already in the database

Recommended Posts

Hi

does anybody know if there is a function that i can use to prepend a string to data in every row of a particular field in the database.

The problem i have is that i have a field called 'images' which contains the name of the image. However, i need to put the path to it before the name. So just want to add the path in to every row.

Thanks

Share this post


Link to post
Share on other sites
Try the following:

[code]UPDATE yourTable SET col1 = CONCAT('string to prepend',col1);[/code]

Hope that helps.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.