How do you stop mysql from setting the number to an insanely high value when say doing… UPDATE users SET points=points-200 WHERE uid=182;
If the user has 100 points, points will be set to 29138389123 or whatever the max is for the field.
Is there a way to put an IF within the query? UPDATE users SET points=points-200 IF points>=200 else points=0 WHERE uid=182???
Why exactly doesn’t mysql just zero out the field when that happens?