php - i cant creat my table in mysql database -
what problem code? explorer show error when run php code.
mysql_query("create table user( username varchar(10) not null, primary key(username), name varchar(20) not null, family varchar(35) not null, graduate int(1) not null, single int(1) not null, children int(1), address varchar, father varchar(20) not null, birthday int not null, start int(50), grade int(1) not null, unit varchar(20) not null, manager varchar(10), mobile varchar(13), officetell varchar(13), tell varchar(13), email varchar(100), sex int(1) not null)") or die(mysql_error());
i think problem here :
address varchar,
you should specify max length of address field since varchar
type:
address varchar(255),
Comments
Post a Comment