I've been googling on this and haven't gotten a clear answer ... does anyone know the final word about it? I didn't find what I was looking for in the manual.
In MySQL 4.1 (I haven't installed v.5 yet), it doesn't seem to be possible for DATETIME columns, but it is possible for TIMESTAMP columns:
[tt]
datetimefield TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
[/tt]
A common use of timestamp columns is to automatically record the time of the latest update of the record, but this can be prevented by omitting the "ON UPDATE" clause from the field's definition.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.