Hello, I am triying to install this database but i get an error. Error message is #1067 - Invalid default value for 'article_id' Here is my database create table articles ( id int(11) NOT NULL auto_increment, name varchar(30) NOT NULL default '', title varchar(40) NOT NULL default'', content text NOT NULL, date datetime NOT NULL default'0000-00-00 00:00:00', ip varchar(20) NOT NULL default'', primary key (id) ) TYPE=MyISAM auto_increment=1 ; create table comments ( id int(11) NOT NULL auto_increment, article_id int(11) NOT NULL default '', name varchar(30) NOT NULL default '', website varchar(50) NOT NULL default '', email varchar(50) NOT NULL default '', comment text NOT NULL, date datetime NOT NULL default'0000-00-00 00:00:00', ip varchar(20) NOT NULL default '', primary key (id) ) TYPE=MyISAM auto_increment=1 ; Thanks for your help
it's an integer, you cannot default value it as a string value ('' is a string value) you will need to default a number
article_id int(11) NOT NULL default 0, OR article_id int(11) NOT NULL, with the latter, if you insert something without setting the value for article_id, the db may throw an error (depending on which db you use).