latheesan
06-30-2005, 04:24 PM
hi everyone,
i was just trying to create these tables and i keep getting error message saying
#1067 - Invalid default value for 'id'
this is the sql code im trying to run
CREATE TABLE users(
id int( 10 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
username varchar( 40 ) ,
PASSWORD varchar( 50 ) ,
regdate varchar( 20 ) ,
email varchar( 100 ) ,
website varchar( 150 ) ,
location varchar( 150 ) ,
show_email int( 2 ) DEFAULT '0',
last_login varchar( 20 ) ,
PRIMARY KEY ( id )
)
So, where exactly im i going wrong?
i was just trying to create these tables and i keep getting error message saying
#1067 - Invalid default value for 'id'
this is the sql code im trying to run
CREATE TABLE users(
id int( 10 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
username varchar( 40 ) ,
PASSWORD varchar( 50 ) ,
regdate varchar( 20 ) ,
email varchar( 100 ) ,
website varchar( 150 ) ,
location varchar( 150 ) ,
show_email int( 2 ) DEFAULT '0',
last_login varchar( 20 ) ,
PRIMARY KEY ( id )
)
So, where exactly im i going wrong?
