...

View Full Version : phpmyadmin import problems



lostsurfer47
02-21-2007, 01:19 AM
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

Nightfire
02-21-2007, 02:00 AM
Try deleting

ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =3;

neomaximus2k
02-21-2007, 01:18 PM
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


# 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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum