Blog

Friday, 15 September 2017 21:36

How to make a bulk price adjustment using SQL in phpMyAdmin

Written by 
Rate this item
(0 votes)

From the SQL query editor, you will need to enter the code to make the price change. Below are a few sample codes to demonstrate increasing and decreasing prices by both specific amounts and percentages. 

 

Sample code to increase all prices by twenty percent (20%).

UPDATE ps_product_shop SET price = price*1.20

UPDATE ps_product SET price = price*1.20

 

Sample code to decrease all prices by 15 cents (.25).

UPDATE ps_product_shop SET price = price-.15

UPDATE ps_product SET price = price-.15

 

Sample code to increase all prices by fifty cents (.15).

UPDATE ps_product_shop SET price = price+0.50

UPDATE ps_product SET price = price+0.50

 

Sample code to decrease all prices by ten percent (10%)

UPDATE ps_product_shop SET price = price / 1.1

UPDATE ps_product SET price = price / 1.1

Read 1222 times

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.