Will this SQL code work if I change the 1.35 to 0.95 to decrease price by 5%?
UPDATE products SET products_price = products_price * 1.35;
Will this SQL code work if I change the 1.35 to 0.95 to decrease price by 5%?
UPDATE products SET products_price = products_price * 1.35;
Provided you are not using a database prefix, yes, that should work. Remember to back up your database first, just in case.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Personally, I can't see anything wrong with it. I think it's quite a clever little statement. Make sure to do a full db backup beforehand, and pls let me know the results.. I might use this someday.
Mods: Admin Activity Report || PO Box Ban || Empty Cart Manager || Autoresponder+ || Zip Validator || Desktop Data || SRiC
That will only handle "products", not any pricing factors related to attributes.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.