I need to decrease all values in an integer column. When one of them equals to 0, it should stop to decrease that value and continue to decrease all other values in that column. I do this with event schedule in Mysql. This works:
UPDATE dbname.tablename SET money = money - 1;
But if I add if statement, it does not works
IF dbname.tablename.money > 0 THEN
UPDATE dbname.tablename SET money = money - 1;
END IF