1

I am getting the following Error

064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from catalog_product_flat_1 a inner join catalog_product_entity c on a.sku' at line 3

when I try out the below query on phpmyadmin

update a 
set a.small_image = b.value
from `catalog_product_flat_1` a
inner join `catalog_product_entity` c
on a.sku = c.sku
inner join `catalog_product_entity_media_gallery` b
on b.entity_id = c.entity_id

I also tryout without using alias but still same issue

1 Answer 1

1

The SET clause comes after the JOIN clauses:

UPDATE `catalog_product_flat_1` a
inner join `catalog_product_entity` c
on a.sku = c.sku
inner join `catalog_product_entity_media_gallery` b
on b.entity_id = c.entity_id
SET a.small_image = b.value

See the documenation:

http://dev.mysql.com/doc/refman/5.5/en/update.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.