Unanswered: getting record to automatically put in default date
is there something similar to "timestamp" column type or a way of having a "date" field automatically insert today's date when the record is created. I want it to do something similar to "timestamp" but i don't want it to change everytime the record is edited/updated. It would just be something like a record creation date. any help would be appreciated. thanks.
From what i've read in the mysql manual "timestamp" behaves differently whether or not mysql is in maxdb mode or not. if in maxdb mode the timestamp will not update to current date/time when the record is updated.
i need to have two columns in my tables. one field that will have a record creation date/time that is defaulted to current date when record is created only. then the second date field will update to current date/time whenever the record is changed. is this possible? i need a solution that will work in maxdb mode or not. why would mysql change the way the 'timestamp' field type behaves depending on maxdb mode or not?
"In addition, if the MySQL server is running in MAXDB mode, TIMESTAMP is identical with DATETIME. That is, if the server is running in MAXDB mode at the time that a table is created, any TIMESTAMP columns are created as DATETIME columns. As a result, such columns use DATETIME display format, have the same range of values, and no automatic updating occurs. "
so if you want automatic timestamp updating, don't run in maxdb mode, is the conclusion i would draw from that