I am coding and ran into a simple problem that I am sure there is a solution too - I just haven't been able to find it. I want to do the following query:
UPDATE `users` SET balance = (balance - 10) WHERE id=1
But if the balance will become a negative number I want an error to be returned. Any ideas on if this is possible?
Thank you,
Ice