patricksky Posted July 22, 2003 Share Posted July 22, 2003 I have the following creat table script create table event( event_id varchar(9) primary key, title varchar(30) not null, description text, photo_dir varchar(8), date date not null default CURRENT_DATE ); when i run this script, the error occur that related to the CURRENT_DATE. the purpose of the date colume set to default current_date is that if user haven\'t given the date, then set this as system current date. what is the error using CURRENT_DATE ? Thx~ Link to comment https://forums.phpfreaks.com/topic/760-the-default-date-setting-at-creating-table/ Share on other sites More sharing options...
shivabharat Posted July 22, 2003 Share Posted July 22, 2003 If I am not wrong I guess it cant be done in mysql when you try to use now() or date() or curdate() it actully sets like this default \'0000-00-00\' I am not sure if there is any way this can be done. Link to comment https://forums.phpfreaks.com/topic/760-the-default-date-setting-at-creating-table/#findComment-2529 Share on other sites More sharing options...
patricksky Posted July 22, 2003 Author Share Posted July 22, 2003 i just try this, that seem cannot work...... Link to comment https://forums.phpfreaks.com/topic/760-the-default-date-setting-at-creating-table/#findComment-2530 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.