我无法在mysql数据库中创建我的表[关闭]

what is the problem with this code? the explorer show error when i run this 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 the problem is here :

address VARCHAR,

you should specify the max length of the address field since its VARCHAR type:

address VARCHAR(255),

it will work:

       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(20), 
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()); 

Can you try this:

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(50), 
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()); 

This is the problem in the code: address VARCHAR

The CHAR and VARCHAR types are declared with a length that indicates the maximum number of characters you want to store. For example, CHAR(30) can hold up to 30 characters.

Refer: http://dev.mysql.com/doc/refman/5.0/en///char.html

You forgot the size for ADDRESS:

address VARCHAR(<size>)