Jump to content

- - - - -

bulk price increase using sql

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1   stevegos

  • Members
  • 4 posts

Posted 19 April 2011 - 12:19


I have a shop selling alcohol products and here in the UK, there is a tax duty price increase on all bottles of 0.15 (15 pence)

So using phpmyadmin (and my limited sql knowledge) I think I can use the following sql to bulk increase the prices across the entire database:

UPDATE 'products' SET 'products_price' = products_price+0.15;

will this work?

Thanks, Steven

Edited by stevegos, 19 April 2011 - 12:20.

#2   stevegos

  • Members
  • 4 posts

Posted 20 April 2011 - 13:12


no-one replied so I backup the db and gave it try. Worked fine!

I did find that my original syntax wasn;t quite right. I had to remove the single quotes and the semi-colon on the end:

UPDATE products SET products_price = products_price+0.15