say p.products_price is 1
why:
UPDATE products p SET p.products_price = (1 + p.products_price) WHERE p.products_id = 8
make p.products_price equal to 3?
He adds 1 to the price, and then does it again and again? I'm trying to make something a little more complicated, but when it didn’t work, I broke it down to the simplest. Can I make some temporary value here and calculate a new price and then set it to this?
Please help, I'm raging, Thanks.
MySQL Client Version: 4.1.22
edit: the column is decimal, I tried the same update in the int column with the same result.
edit: this does not work in the code, so it is not possible for the code to call the same update twice
source share