Code:
-- Trigger updates passwd_modified_at field if passwd modified
--
delimiter $$ <<this line
DROP TRIGGER IF EXISTS ca_passwd_trigger ;
$$ <<this line
CREATE TRIGGER ca_passwd_trigger BEFORE UPDATE ON users
FOR EACH ROW
BEGIN
IF ((NEW.passwd <=> OLD.passwd) = 0) THEN
SET NEW.passwd_modified_at = NOW();
END IF;
END;$$ <<this line
delimiter ;
-- --------------------------------------------------------
The $$ is causing an error when I try to run install.sql in phpmyadmin. A table called New is created but it is empty. What am I doing wrong?
proof that an old dog can learn new tricks