SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    43 03' 16" N :::: 77 36' 03" W
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mysql syntax error

    i took this straight from Robouk's tutorials
    mysql query:
    Code:
    CREATE TABLE user (
    ID smallint(3) NOT NULL auto_increment,
    Name varchar(30) NOT NULL default '',
    Password varchar(32) NOT NULL default '',
    PRIMARY KEY (ID),
    UNIQUE KEY Name (Name)
    ) TYPE=MyISAM;
    ..entered it into phpmyadmin's sql querries page, and it gave me this error
    Code:
    Error
    
    SQL-query :  
    
    CREATE TABLE user( ID smallint( 3 ) NOT NULL AUTO_INCREMENT , Name varchar( 30 ) NOT NULL default '', PASSWORD varchar( 32 ) NOT NULL default '', PRIMARY KEY ( ID ) , UNIQUE KEY Name( Name ) ) TYPE = MYISAM 
    
    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 'user( ID smallint( 3  )  NOT  NULL  AUTO_INCREMENT , Name varch
    Back
    can someone help me find the error and set up this table (for user login/registration)

    thanks
    There's no place like 127.0.0.1

  2. #2
    SitePoint Zealot Egghead's Avatar
    Join Date
    Feb 2002
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried it on my set up and have to say it worked fine without problems. I can not see anything wrong with the syntax.
    Would you like to indulge a little more information such as your setup/configuration, operating sytem, server and so on. I don't know if it will make a huge difference but there just might be something in there to tell us.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    43 03' 16" N :::: 77 36' 03" W
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    forgot to mension i'm using mysql4, not 3.

    however. i no longer need that query. (i wish i knew how to delete my thread). thanks for your time.
    There's no place like 127.0.0.1


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
  •