Jump to content

Syntax error - creating a table in PHPmyadmin


downah

Recommended Posts

Hey guys, I am trying to create this table, but phpmyadmin is giving me this error and I don't understand why.. could anyone show the light?

 

Error

SQL query:

CREATE TABLE `socialscenes`.`Members` (
`memberID` INT( 4 ) NOT NULL ,
`username` VARCHAR( 20 ) NOT NULL ,
`password` VARCHAR( 20 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
`datejoined` DATE NOT NULL ,
`lastvisit` DATE NOT NULL ,
`firstname` VARCHAR( 20 ) NOT NULL ,
`familyname` VARCHAR( 20 ) NOT NULL ,
`memberage` INT( 2 ) NOT NULL ,
`town` VARCHAR( 20 ) NOT NULL ,
`postcode` VARCHAR( 6 ) NOT NULL ,
`dob` DATE NOT NULL ,
`photo` VARCHAR( 50 ) NOT NULL ,
`agreewithterms` ENUM NOT NULL ,
`proactiveemails` INT( 2 ) NOT NULL ,
`eventshosted` INT( 3 ) NOT NULL ,
`eventsattended` INT( 3 ) NOT NULL ,
`warnings` INT( 2 ) NOT NULL ,
`banned` ENUM NOT NULL ,
`karmarating` INT( 4 ) NOT NULL ,
`selfdescription` TEXT NOT NULL ,
`gender` VARCHAR( 10 ) NOT NULL ,
PRIMARY KEY ( `memberID` ) ,
INDEX ( `familyname` ) ,
UNIQUE (
`username`
)
) ENGINE = InnoDB

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, `proactiveemails` INT(2) NOT NULL, `eventshosted` INT(3) NOT NULL, `ev' at line 1 

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.