I have a todo list on my website where I have a field to time stamp when the item was created and one for when the item was completed I planned on using this statement to make that happen.
CREATE TRIGGER todo_add BEFORE INSERT ON `todo`
FOR EACH ROW SET NEW.date_time = NOW(), NEW.complete_date_time = '0000-00-00 00:00:00';
CREATE TRIGGER todo_complete BEFORE UPDATE ON `todo`
FOR EACH ROW SET NEW.complete_date_time = NOW(), NEW.date_time = OLD.date_time;
I have used it before in the past, however is seems this host wont allow "Triggers" in mysql. My question is how can I do this same thing in MySql.
Rab