Without using PHP or anything. Is there a way to do something like this:
UPDATE myTable SET var1 = var1 + 1 IF var1 < 5 ELSE var1 = 0 WHERE [WHERE clause]
Never really done any IF mySQL things so a little unsure?
So the result would be that the variable would never be higher than 5 and reset to 0 if its at 5 when incremented.
TIA