Jump to content

Adding data to field with data in


spottedhaggis

Recommended Posts

Hi,

Newbie here.

I needa little help, hope you can help me.  I have a database and need to add a path to a field.  The field data already contains an image filename - 123_1234.jpg.

This is all about Zencart.  My host has a 2k limit on files in a specific folder, however my client havs 2700 images (products) so the only way I can see around this is to alter the image paths for each category as follows.

Currently all images are in the image folder, and in the DB its simply field - images - data = image filename.

What I want to do is run a query that only updates all image fild content for a specific category ID number (there are 15 categories) so in summary

Update the content of the image field where all category IDs are equal to a specified number (1) and add cat1/ to the front of the data already inside the image field.

Can this be done at all.

So where the images field data was as follows : 123-1234.jpg
I need it to be cat1/123-1234.jpg for all images designated to category 1, and cat2 etc etc

Whew, thanks in advance for any help on this.
Link to comment
https://forums.phpfreaks.com/topic/29458-adding-data-to-field-with-data-in/
Share on other sites

Archived

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

×
×
  • Create New...

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.