Multiply Column by 1.0003 and then round result up to nearest whole number.
This is supposed to multiply the bank balance by 1.0003 and then always round the result up to the nearest whole number So, for instance, if you had 5,000 points in your account, this would multiply it by 1.0003 which would give you 5,001.5 Then the round() function should round this up to 5,002
UPDATE `accounts` SET `bank_balance` = `bank_balance` + ceiling(`bank_balance` * 1.0003) WHERE `user_id` = 1
However, what's happening is MySQL is just doubling the bank balance and adding 1 to it. So a balance of 5,000 turns into 10,001, for example.
How can I get it to round it like I want?
The better I get at programming, the more I appreciate arrays. Handy dandy things they are.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)