downah Posted March 13, 2012 Share Posted March 13, 2012 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 https://forums.phpfreaks.com/topic/258793-syntax-error-creating-a-table-in-phpmyadmin/ Share on other sites More sharing options...
AyKay47 Posted March 13, 2012 Share Posted March 13, 2012 You havent specified the list of values for the enum type field. Link to comment https://forums.phpfreaks.com/topic/258793-syntax-error-creating-a-table-in-phpmyadmin/#findComment-1326665 Share on other sites More sharing options...
downah Posted March 13, 2012 Author Share Posted March 13, 2012 Thanks, just realized it myself first time using ENUM fields thought it was default 0 and 1 or something Link to comment https://forums.phpfreaks.com/topic/258793-syntax-error-creating-a-table-in-phpmyadmin/#findComment-1326666 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.