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~ Quote Link to comment 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. Quote Link to comment 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...... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.