Quick newbie MySQL question. What would be the simplest way to ensure that the minimum value of a given field is 0?
Basically, we have a script that runs automatically and subtracts an integer value from the value of a field every 15 minutes--but we want any entry that gets to 0 to stay at 0 and not go negative.
This could be simply done with a loop in PHP but I'm trying to limit calls to the database...
Is there a simple way to either make the minimum value for a field 0 or make it so any negative value put in that field automatically becomes 0?
Thanks!