jennypsion
Programmer
Hello,
I have just written a trigger, which changes a field in my table after a certain date was reached.
This is my trigger, including the error message:
mysql> create trigger closeAuction before insert on auction for each row begin update auction set closed = 'true' where current_date() > deadline end;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update auction set closed = 'true' where current_date() > deadline end' at line 1
I can't see what's wrong with my trigger.
Thanks for your help,
Jen
I have just written a trigger, which changes a field in my table after a certain date was reached.
This is my trigger, including the error message:
mysql> create trigger closeAuction before insert on auction for each row begin update auction set closed = 'true' where current_date() > deadline end;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update auction set closed = 'true' where current_date() > deadline end' at line 1
I can't see what's wrong with my trigger.
Thanks for your help,
Jen