Hey guys,
I normally work with oracle stuff, but today I'm messing around with mysql. Anyway I am trying to compile a trigger
DROP trigger PAGES2_TRG_2
delimiter $$
CREATE TRIGGER PAGES2_TRG_2
BEFORE insert ON PAGES2
FOR EACH ROW
BEGIN
IF NEW.DATE is null THEN
SET NEW.DATE = CURDATE();
END IF;
END$$
The lines in bold keep giving me a syntax error #1064 ??
edit**
DATE is 'datetime'
Thanks Kevin.
I normally work with oracle stuff, but today I'm messing around with mysql. Anyway I am trying to compile a trigger
DROP trigger PAGES2_TRG_2
delimiter $$
CREATE TRIGGER PAGES2_TRG_2
BEFORE insert ON PAGES2
FOR EACH ROW
BEGIN
IF NEW.DATE is null THEN
SET NEW.DATE = CURDATE();
END IF;
END$$
The lines in bold keep giving me a syntax error #1064 ??
edit**
DATE is 'datetime'
Thanks Kevin.