update positive to negative value in mysql
mysql
Solution
If I understand you correctly, you also want to set amount column to positive value along with the above statement.
You can use something like this
UPDATE payment
SET reason = 'refund', amount = amount * -1, total = total * -1
WHERE uid =5 AND date = '2012-05-01' AND accid =2
Problem
i have payment table fields update reason and amount & total field are change negative ``` UPDATE payment SET reason = 'refund' WHERE uid =5 AND date = '2012-05-01' AND accid =2 ``` update single query is it possible?