Jump to content

Syntax error - creating a table in PHPmyadmin


downah
 Share

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 

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.