Curdate() returns a datetime, which you are pushing into a date field.
It is truncating the time part. Just truncate it and you should be
fine :)
Hmmm. Not according to
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_curdate
or, indeed, experiments:
mysql select
I'm very new to triggers, so I suspect I've done something naive.
When a row is inserted into a table, I want populate a 'date' column with
the date 45 days hence. I've created a trigger:
CREATE TRIGGER `test`.`setExpiryDate` BEFORE INSERT ON `test`.`mysql_auth`
FOR EACH ROW SET NEW.expires =