Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

mysql syntax error!

  • 05-06-2006 05:58PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 19,396 ✭✭✭✭Karoma


    `ip` varchar(15) NOT NULL,

    Remove the comma?


    What version of MySQL?


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


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


Advertisement