Re: Preventing Negative values in table. Trigger was the way to go, works perfect!
Thanks for the input.
CREATE TRIGGER t_UpdateMemberStats BEFORE UPDATE ON members.member_stats
FOR EACH ROW BEGIN
IF NEW.news_comments < 0 THEN SET NEW.news_comments = 0; END IF;
IF NEW.photo_comments < 0 THEN SET NEW.photo_comments = 0; END IF;
END;
-Paul |