> 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> selec
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 :)
Walter
On Fri, Jun 5, 2009 at 5:56 AM, Keith Edmunds wrote:
> I'm very new to triggers, so I suspect I've done something naive.
>
> When a row is inser
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 =