Jump to content

#1067 - Invalid default value for 'id'


roslen

Recommended Posts

Help plz. i get this error when running code below.

 

Error
SQL query: 

CREATE TABLE wateva_table(

id int( 9 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
name varchar( 20 ) NOT NULL ,
COMMENT text NOT NULL ,
date varchar( 10 ) NOT NULL ,
time varchar( 10 ) NOT NULL ,
ip varchar( 39 ) ,
PRIMARY KEY ( id ) 
) 

MySQL said:  

#1067 - Invalid default value for 'id' 

can i just remove the default like this:

id int( 9 ) NOT NULL AUTO_INCREMENT ,

will that make the default to number '0'

 

Link to comment
https://forums.phpfreaks.com/topic/64056-1067-invalid-default-value-for-id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.