Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    phpmyadmin import problems

    I have a account with GoDaddy.com and I want to import a sqldump into one of my databases that I created on GoDaddy. However I dont see the import tab or anyone else in the phpmyadmin panel. The only place I can do it at is when I click on Query Window > Import Files...

    But I get a message when trying to import from there...
    SQL query:
    Im thinking its a permission problem but I cant change the permissions anywhere on the backend.


    # MySQL returned an empty result set (i.e. zero rows).
    CREATE TABLE IF NOT EXISTS `jos_banner` (
    `bid` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `cid` int( 11 ) NOT NULL default '0',
    `type` varchar( 10 ) NOT NULL default 'banner',
    `name` varchar( 50 ) NOT NULL default '',
    `imptotal` int( 11 ) NOT NULL default '0',
    `impmade` int( 11 ) NOT NULL default '0',
    `clicks` int( 11 ) NOT NULL default '0',
    `imageurl` varchar( 100 ) NOT NULL default '',
    `clickurl` varchar( 200 ) NOT NULL default '',
    `date` datetime default NULL ,
    `showBanner` tinyint( 1 ) NOT NULL default '0',
    `checked_out` tinyint( 1 ) NOT NULL default '0',
    `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
    `editor` varchar( 50 ) default NULL ,
    `custombannercode` text,
    PRIMARY KEY ( `bid` ) ,
    KEY `viewbanner` ( `showBanner` )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =3;

    MySQL said: Documentation
    #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 'DEFAULT CHARSET=utf8 AUTO_INCREMENT=3' at line 19

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Try deleting

    ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =3;

  • #3
    Regular Coder
    Join Date
    Jan 2007
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The problem here is in the characterset, depending on what MYSQL version is running it will either error in the way you have stated or work.

    The simplet way of doing this is to remove several pieces of information from the query
    Code:
    # MySQL returned an empty result set (i.e. zero rows).
    CREATE TABLE IF NOT EXISTS `jos_banner` (
    `bid` int( 11 ) NOT NULL AUTO_INCREMENT ,
    `cid` int( 11 ) NOT NULL default '0',
    `type` varchar( 10 ) NOT NULL default 'banner',
    `name` varchar( 50 ) NOT NULL default '',
    `imptotal` int( 11 ) NOT NULL default '0',
    `impmade` int( 11 ) NOT NULL default '0',
    `clicks` int( 11 ) NOT NULL default '0',
    `imageurl` varchar( 100 ) NOT NULL default '',
    `clickurl` varchar( 200 ) NOT NULL default '',
    `date` datetime default NULL ,
    `showBanner` tinyint( 1 ) NOT NULL default '0',
    `checked_out` tinyint( 1 ) NOT NULL default '0',
    `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
    `editor` varchar( 50 ) default NULL ,
    `custombannercode` text,
    PRIMARY KEY ( `bid` ) ,
    KEY `viewbanner` ( `showBanner` )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =3;
    Simpoly remove the part in red and the query should work
    Matthew Bagley
    Paramiliar Design Studios
    Website Design | Website Development | Search Engine Optimisation (SEO)


  •  

    Posting Permissions

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