SET credits=credits+$turns Code (markup): What I wanna do is make it add + 25% to $turns I made SET credits=credits+$turns*1,25 Code (markup): but it didn't work so if turns is 100 and credits is 20 it would do 20 + 125 because 25% of 100 is 25 and 25+100 is 125 why didn't it work? should I use , or .?
Well I don't have a clue what your code is doing, I must be a n00b. To add 25% to $turns you do, $turns = $turns * 1.25; PHP:
Nicangeli: It's SQL code (you probably knew), but yes - this would be a lot simpler. Just multiply it via PHP and then simply add the variable in MySQL Whether you should use , or . depends on your locale settings, I would recommend trying . first - always print mysql_error() if you think it didn't work so you know why it failed. Dan