1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[please help] sql error #1064

Discussion in 'General Scripting Chat' started by Lordemma, Sep 7, 2012.

  1. Lordemma

    Lordemma Junior Member

    Joined:
    Jun 29, 2011
    Messages:
    170
    Likes Received:
    11
    hell pals, can any one tell me what the hell is wrong with this sql code? I do get this error when importing the sql database
    Code:
     "
    [B]SQL query:[/B]     
                  -- phpMyAdmin SQL Dump -- version 2.6.4-pl2 -- [URL]http://www.phpmyadmin.net[/URL] --  -- Host: localhost -- Generation Time: Apr 29, 2006 at 07:31 PM -- Server version: 4.0.25 -- PHP Version: 4.3.11 --  --   -- --------------------------------------------------------  --  -- Table structure for table `addressbook` --   CREATE TABLE `addressbook` (   `id` int(64) NOT NULL auto_increment,   `nickname` varchar(64) NOT NULL default '',   `phone` varchar(64) NOT NULL default '',   `grup` varchar(64) NOT NULL default '',   `first` varchar(64) NOT NULL default '',   `last` varchar(64) NOT NULL default '',   `email` varchar(64) NOT NULL default '',   `address` varchar(64) NOT NULL default '',   `city` varchar(64) NOT NULL default '',   `state` varchar(64) NOT NULL default '',   `zip` varchar(64) NOT NULL default '',   `home` varchar(64) NOT NULL default '',   `country` varchar(64) NOT NULL default '',   `fax` varchar(64) NOT NULL default '',   `details` varchar(64) NOT N[...]     
          [B]MySQL said: [/B][URL="http://gurushost.com:2082/3rdparty/phpMyAdmin/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.5%2Fen%2Ferror-messages-server.html&token=70103ab938cd443bcde88212c168a76a"][IMG]http://gurushost.com:2082/3rdparty/phpMyAdmin/themes/pmahomme/img/b_help.png[/IMG][/URL] 
      #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 'TYPE=MyISAM AUTO_INCREMENT=1' at line 36 "
    
    here is the part of the code causing the error. any idea how to fix this? 
    
    -- phpMyAdmin SQL Dump
    -- version 2.6.4-pl2
    -- [URL]http://www.phpmyadmin.net[/URL]
    -- 
    -- Host: localhost
    -- Generation Time: Apr 29, 2006 at 07:31 PM
    -- Server version: 4.0.25
    -- PHP Version: 4.3.11
    -- 
    -- 
    
    -- --------------------------------------------------------
    
    -- 
    -- Table structure for table `addressbook`
    -- 
    
    CREATE TABLE `addressbook` (
      `id` int(64) NOT NULL auto_increment,
      `nickname` varchar(64) NOT NULL default '',
      `phone` varchar(64) NOT NULL default '',
      `grup` varchar(64) NOT NULL default '',
      `first` varchar(64) NOT NULL default '',
      `last` varchar(64) NOT NULL default '',
      `email` varchar(64) NOT NULL default '',
      `address` varchar(64) NOT NULL default '',
      `city` varchar(64) NOT NULL default '',
      `state` varchar(64) NOT NULL default '',
      `zip` varchar(64) NOT NULL default '',
      `home` varchar(64) NOT NULL default '',
      `country` varchar(64) NOT NULL default '',
      `fax` varchar(64) NOT NULL default '',
      `details` varchar(64) NOT NULL default '',
      `owner` varchar(64) NOT NULL default '',
      UNIQUE KEY `id` (`id`)
    ) TYPE=MyISAM AUTO_INCREMENT=1 ;
    
    -- 
    -- Dumping data for table `addressbook`
    -- 
    
    Please help if you can! Thanks in advance
     
    Last edited by a moderator: Sep 7, 2012
  2. skywalker55

    skywalker55 Junior Member

    Joined:
    Jan 29, 2010
    Messages:
    123
    Likes Received:
    109
    Occupation:
    Web App Development
    Location:
    London
    try this...

    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
     
    • Thanks Thanks x 1
  3. Lordemma

    Lordemma Junior Member

    Joined:
    Jun 29, 2011
    Messages:
    170
    Likes Received:
    11
    bro You mean I should replace
    ) TYPE=MyISAM AUTO_INCREMENT=1 ; with the code you provided above?
     
  4. SonicSam

    SonicSam Registered Member

    Joined:
    Aug 21, 2012
    Messages:
    57
    Likes Received:
    5
    Location:
    X
    I'm not certain that will fix it but yes that is what skywalker means.
     
  5. skywalker55

    skywalker55 Junior Member

    Joined:
    Jan 29, 2010
    Messages:
    123
    Likes Received:
    109
    Occupation:
    Web App Development
    Location:
    London
    yes thats right
     
  6. Lordemma

    Lordemma Junior Member

    Joined:
    Jun 29, 2011
    Messages:
    170
    Likes Received:
    11
    waoh! this actually fix the error man! Thanks!!!!!!!!!!!!
     
  7. skywalker55

    skywalker55 Junior Member

    Joined:
    Jan 29, 2010
    Messages:
    123
    Likes Received:
    109
    Occupation:
    Web App Development
    Location:
    London
    Cool man. Happy to help.
     
    • Thanks Thanks x 2