Page 1 of 1

CURRENT_TIMESTAMP

Posted: Thu Oct 08, 2009 12:40 am
by brmcdani
When I enter CURRENT_TIMESTAMP in for my default value it gives me an invalid default value for 'edit time'

My type is int does this need to be different?

Anyone know what I can enter in to make this go away?

The error I get is "Invalid default value for 'edit_time' "

Re: CURRENT_TIMESTAMP

Posted: Thu Oct 08, 2009 4:52 am
by robnet
current_timestamp would be in the datetime or date format so your field type also needs to be either datetime or date

Re: CURRENT_TIMESTAMP

Posted: Thu Oct 08, 2009 11:04 am
by pickle
As far as I know, there's no way to make the current timestamp be a default value for a column. You can certainly make the default the timestamp for when you create the table, but not the timestamp for when a row is added.

Re: CURRENT_TIMESTAMP

Posted: Thu Oct 08, 2009 1:27 pm
by robnet
Good point pickle :oops: