SQL for price updates
Posted: Sun Jun 13, 2021 3:52 pm
Hi,
To increase all products by certain percentage per manufacturer in PhpMyAdmin is simple and has been covered before:
eg.
update `products` set `products_price` = (`products_price` * '1.05') WHERE `manufacturers_id` = '23';
Alas this only fully works with un-attributed products.
'products_attributes' does not have the manufacturer_id as a column as its in 'products'.
Any suggestions on how the above SQL query be changed, so as to also increase the attributes by the set percentage? (of the manufacturers products)
To increase all products by certain percentage per manufacturer in PhpMyAdmin is simple and has been covered before:
eg.
update `products` set `products_price` = (`products_price` * '1.05') WHERE `manufacturers_id` = '23';
Alas this only fully works with un-attributed products.
'products_attributes' does not have the manufacturer_id as a column as its in 'products'.
Any suggestions on how the above SQL query be changed, so as to also increase the attributes by the set percentage? (of the manufacturers products)