Jump to content

Recommended Posts

Posted (edited)

I have a MySQL database with a productnumber and productimages field. The productnumber field already has data in it eg. prod001, prod002 etc

So I was wondering if anyone knew if there was an easy way to copy the data into the productnumber field but change it so that it was in the format images/productnumber.jpg (images/prod001.jpg images/prod002.jpg) etc.

I'm pretty new to all this database stuff if you cant already tell:)

 

Cheers

 

Edit: Been trying this but it doesn't seem to like it very much :(

update products set `productimages` = 'images/' + `productnumber` + '.jpg';

Edited by UproarUK

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...