create trigger in mySQL problem
Posted by:
freggeltje
(---.dmz-eu.st.com)
Date: July 10, 2006 01:30PM
Hi all,
I'm trying to create a trigger that every time I add a item in my table update the 'time added' field.
I searched the syntax for mySQL 5 version of the syntax and I wrote the following trigger:
CREATE TRIGGER wordadded AFTER INSERT ON glossary
BEGIN
UPDATE glossary SET glossary.Date_Added = NOW() WHERE glossary.Name = NEW.Name;
END;
What do I do wrong?
Thx,
Kenny