Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

mysql syntax error!

Options
  • 05-06-2006 5:58pm
    #1
    Registered Users Posts: 3,514 ✭✭✭


    i'm terrible at debuging sql code bemused.gif
    MySQL said:

    You have an error in your SQL syntax near '( 500 ) NOT NULL , `price` VARCHAR( 10 ) NOT NULL , `date` DATE NOT NULL default' at line 1
    CREATE TABLE `events` (
    `userid` INT( 25 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    `first_name` VARCHAR( 25 ) NOT NULL ,
    `last_name` VARCHAR( 25 ) NOT NULL ,
    `email_address` VARCHAR( 25 ) NOT NULL ,
    `username` VARCHAR( 25 ) NOT NULL ,
    `homepage` VARCHAR( 25 ) NOT NULL ,
    `archive` enum('0','1') NOT NULL default '0',
    `password` VARCHAR( 25 ) NOT NULL ,
    `title` VARCHAR( 35 ) NOT NULL ,
    `info` BLOB( 500 ) NOT NULL ,
    `price` VARCHAR( 10 ) NOT NULL ,
    `date` DATE NOT NULL default '0000-00-00' ,
    `user_level` enum('0','1','2','3','4') NOT NULL default '0',
    `signup_date` datetime NOT NULL default '0000-00-00 00:00:00',
    `last_login` DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL ,
    `activated` enum('0','1') NOT NULL default '0',
    `ip` varchar(15) NOT NULL,
    ) COMMENT = 'events table'
    


Comments

  • Registered Users Posts: 19,396 ✭✭✭✭Karoma


    `ip` varchar(15) NOT NULL,

    Remove the comma?


    What version of MySQL?


  • Registered Users Posts: 3,514 ✭✭✭Rollo Tamasi


    sorted! blobs don't have a size value either
    cheers


Advertisement