Add percentage to existing Prices - Non-Zero amounts


This is a follow up question to my previous one. I'm using PHPmyAdmin for changes to the field below.

How do I add 10% to 3,000 Fields called 'price' (Table Name = 'ss_products') where the field is not = zero?

I'm a newb at mySQL, so please include a working answer.

Who is Participating?
Roger BaklundConnect With a Mentor Commented:
As allways when doing UPDATES, make a backup first (or run on test table):
# backup:
CREATE TABLE ss_products_backup SELECT * FROM ss_products 
# update prices
UPDATE ss_products SET price = price + price/10

Open in new window

awking00Connect With a Mentor Commented:
See attached.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.