I facing a problem where i cant update my mysql data with calculation and if statement
i want to update my column answer column and make calculation between column one and two depending on column sign.whether to sum minus multiply or divide:S
UPDATE calculation SET answer
IF (sign = +) THEN SET answer=one+two
ELSE IF (sign = -) THEN SET answer=one-two
ELSE IF (sign = *) THEN SET answer=one*two
ELSE
SET answer=one/two
END IF;
Thanks in advance!
regards
WS