Create Trigger

I’m trying to create a trigger fo a table called publisher. The trigger is supposed to control and adjust the year everytime someone wants to ad a post to the table, if the year is after the current year (in the future) it´s supposed to change to current year. I also have to supplement with a trigger for everytime the table is updated, otherwise someone can change the year for a current post.

This is what I’ve got (but it’s not working and I don’t know why…):

CREATE TRIGGER publisher_BEFORE_INSERT
BEFORE INSERT ON publisher FOR EACH ROW BEGIN
declare current_year integer;
set current_year = year(sysdate());
if NEW.Founded > current_year then
set NEW.Founded = current_year;
end if;
END
CREATE TRIGGER publisher_BEFORE_UPDATE
BEFORE UPDATE ON publisher FOR EACH ROW BEGIN
declare current_year integer;
set current_year = year(sysdate());
if NEW.Founded > current_year then
set NEW.Founded = current_year;
end if;
END