PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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 using PHP.
Rab
Last edited by Rabastan on Thu May 24, 2012 2:50 pm, edited 1 time in total.