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

A simple SQL error

Options
  • 11-03-2004 10:53pm
    #1
    Closed Accounts Posts: 414 ✭✭


    Ok trying to create this table for a signup form in php. Keep getting this error messages, anyone tell me what going on?

    SQL-query :

    CREATE TABLE `users` (

    `user_id` INT( 12 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
    `username` VARCHAR( 50 ) NOT NULL ,
    `password` VARCHAR( 50 ) NOT NULL ,
    `f_name` VARCHAR( 50 ) NOT NULL ,
    `l_name` VARCHAR( 50 ) NOT NULL ,
    `email ` VARCHAR( 92 ) NOT NULL ,
    `gender` VARCHAR( 40 ) NOT NULL ,
    `birthday` DATE( 40 ) NOT NULL ,
    `region` VARCHAR( 60 ) NOT NULL ,
    `find` VARCHAR( 80 ) NOT NULL ,
    `zip` VARCHAR( 40 ) NOT NULL ,
    `country` VARCHAR( 50 ) NOT NULL ,
    `check` VARCHAR( 50 ) NOT NULL ,
    PRIMARY KEY ( `user_id` )
    )

    MySQL said:


    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 '(40) NOT NULL, `region` VARCHAR(60) NOT NULL, `find` VARCHAR(80


Comments

  • Registered Users Posts: 102 ✭✭OmeGar


    the only thing that jumps out is that you are using the Date Datastructure, are you sure you are putting in the right number of varibles?

    it's all i can see.....maybe i should leave it someone who knows SQL


  • Closed Accounts Posts: 414 ✭✭Divine


    ok OmeGar i just checked up dates there, yeah i should have had them not set at anything. Cheers for that.!!


Advertisement