"Table Creat" problem in SQL Expert Help plz

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "Table Creat" problem in SQL Expert Help plz

    im using mysql v3.4.9

    im setuping a toplist script and trying to import and sql but getting dat error:


    Code:
    Error
    
    SQL query:
    
    CREATE TABLE `ban_ip` (
    `ip` int( 11 ) NOT NULL default '0',
    `id` int( 11 ) default '0',
    UNIQUE KEY `ip` ( `ip` ) KEY `id` ( `id` )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8;
    
    MySQL said: Documentation
    #[B][COLOR="#FF0000"]1064 - 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 'KEY `id` (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8' at line 5[/COLOR][/B]


    wt i need to change in that code

    my orginal code is:

    Code:
    CREATE TABLE `ban_ip` (
      `ip` int(11) NOT NULL default '0',
      `id` int(11) default '0',
      UNIQUE KEY `ip` (`ip`)
      KEY `id` (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

    and getting same erro with dat table also:

    Code:
    CREATE TABLE `top` (
      `id` int(11) NOT NULL auto_increment,
      `mesto` int(11) NOT NULL,
      `name` varchar(40) NOT NULL,
      `opisanie` varchar(200) NOT NULL,
      PRIMARY KEY  (`id`),
      KEY `mesto` (`mesto`)
    ) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
    Last edited by BDplanet; 23.04.12, 06:58.

    #2
    missing ,,,,,,,,,,,,,,,,

    Comment


      #3
      Originally posted by something else View Post
      missing ,,,,,,,,,,,,,,,,
      wt missing bro plz tell me i need it urgent

      Comment


        #4
        UNIQUE KEY `ip` (`ip`),

        Comment


          #5
          Originally posted by something else View Post
          UNIQUE KEY `ip` (`ip`),
          yeas i find it where im rong thank u so much

          Comment

          Working...
          X