Jump to content

Database SQL Query


Recommended Posts



Like in screenshot I want to update price for id_shop = 1 from id_shop = 14 (with adding + % value or + numerical value).

I want update only existing products for each id_shops (on screenshot I have only one product existing in both shops).






Can someone help?

Share this post

Link to post
Share on other sites




UPDATE ps_product_shop a
INNER JOIN ps_product_shop b
ON a.id_product=b.id_product AND a.id_shop<>b.id_shop
SET a.price = b.price * x WHERE a.id_shop=14 AND b.id_shop=1

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More