Jump to content

Images alt


crash11

Recommended Posts

On 9/29/2022 at 8:30 AM, webprog said:

Hello, you can use ps_image_lang table for this.

Yes, I did it. I used this code to do it

First this:

CREATE TABLE result_table2 AS
SELECT p.id_product, p.id_image, s.name
FROM ps_image_shop p
LEFT JOIN ps_product_lang s ON p.id_product = s.id_product WHERE s.id_lang=1;

Then this:

UPDATE ps_image_lang
JOIN result_table2
ON ps_image_lang.id_image = result_table2.id_image
SET ps_image_lang.legend = result_table2.name;

 

 

Link to comment
Share on other sites

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