babyshandy
3/11/2015 - 6:23 PM

Add unchanging date/timestamp to record as it is added to the table. http://dev.mysql.com/doc/refman/5.5/en/trigger-syntax.html http://stack

-- MySQL 5.5 syntax
-- yourTriggerName must be unique to the database
CREATE TRIGGER yourTriggerName BEFORE INSERT ON yourTable 
FOR EACH ROW SET NEW.yourField = NOW();