What is the code you are running and what is the error?
The field UPDATED is a timestamp field, it has length 0 because it doesn't let me change it, decimals 0 and allow null.
The Default value I put in the mysql program for the field is: now();
It has the checkbox for On Update Current_Timestamp selected.
I get this error: 1067 'Invalid default value for value updated'
I did a google search on "mysql now" and found this page. http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html
I noticed one synonym for now is current_timestamp(). I'd try that with a 0 in the brackets.
Hi Dan I tried deleting the field UPDATED and then adding it again, I used the following three options:
But I get this error in mysql: '1067 Invalid default value for UPDATED'
Since I don't actually use mysql, and nobody else has answered, you might have better luck on a mysql forum.
It it is truly a timestamp field, there should be no need for a default value... no?
Thanka for all the input I played around a lot with it and I made it work, this is what I did to the timestamp mysql field:
Field length 0.
Allow null NO
Checkbox for On Update Current_Timestamp selected
Default value CURRENT_TIMESTAMP
It now works fine adding/updating the date for both a new and an exisiting record automatically
Thanks for all the help about dates