SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard jonese's Avatar
    Join Date
    Jul 1999
    Location
    Powder Springs GA (Atlanta)
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySql Create statement error

    anyone see what is wrong with this statement?

    CREATE TABLE `people` (`mem_num` BIGINT NOT NULL, `fname` TEXT NOT NULL, `lname` TEXT NOT NULL, `mname` TEXT NULL, `social` INT(9) NULL, `address1` TEXT NULL, `address2` TEXT NULL, `city` TEXT NULL, `state_id` INT NOT NULL, `country_id` INT NOT NULL, `hphone` INT(14) NULL, `wphone` INT(14) NULL, `cphone` INT(14) NULL, `com_kate` INT(11) NULL, `email` TEXT NOT NULL, `alt_email` TEXT NULL, `login` VARCHAR NOT NULL, `password` VARCHAR NOT NULL, `lpass_q` TEXT NOT NULL, `lpass_a` TEXT NOT NULL, `user_level` INT NOT NULL, `pin_level` INT NULL, `upline` INT NULL, `active` ENUM('t','f') DEFAULT 't' NOT NULL, `start_date` TIMESTAMP DEFAULT 'now()' NOT NULL, PRIMARY KEY (`mem_num`))

    i get the error:

    ERROR 1064: You have an error in your SQL syntax near 'NOT NULL, `password` VARCHAR NOT NULL, `lpass_q` TEXT NOT NULL, `lpass_a` TEXT N' at line 1

    This happens at the command line and in phpMyAdmin.

  2. #2
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MY EYES!

    :eyes melt:

    Read up on datatypes here:
    http://www.mysql.com/doc/C/o/Column_types.html

    And use them appropriately.

  3. #3
    SitePoint Wizard jonese's Avatar
    Join Date
    Jul 1999
    Location
    Powder Springs GA (Atlanta)
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doh! been awhile since i played in MySQL land. I've been in PGSQL for so long...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •