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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.