View Single Post
  #2 (permalink)  
Old 07-03-09, 09:11 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 2,838
Thanks: 13
Thanked 11 Times in 10 Posts
Unless I misunderstand your intent, I don't think you want to SUM the values. That'll basically add them all together, resulting in a single value. Is that what you want to do, or....?



Quote:
Originally Posted by Regan Shepherd View Post
Hi,

I'm new to mysql I'm try to do this… see below.
I don't need any PHP code as I'm just trying to update the database via mysql with an sql query.

From the table ic_option_values
Select all of the price_change values that are not equal to 0.
Multiply these by 1.55
Round the values to the nearest whole number

Don't laugh… here's my attempt.

UPDATE *
FROM `ic_option_values`
WHERE `price_change` !=0
SUM(`price_change`* 1.55)
ROUND (`price_change`, 0)

Any help would be most appreciated.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data (scroll down)
Reply With Quote