cursed Posted January 22, 2007 Share Posted January 22, 2007 mySQL file is attached:here are the tables for the mySQL:[code]CREATE TABLE `ads` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `code` text NOT NULL, `location` varchar(255) NOT NULL default '', `advertisername` varchar(255) NOT NULL default '', `adcomment` text NOT NULL, `impressions` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;CREATE TABLE `categories` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `type` varchar(255) NOT NULL default 'Games', `desc` varchar(255) NOT NULL default '', `keywords` varchar(255) NOT NULL default '', `order` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;CREATE TABLE `comments` ( `id` int(10) NOT NULL auto_increment, `gid` int(10) NOT NULL default '0', `uid` int(10) NOT NULL default '0', `comment` varchar(255) NOT NULL default '', `rating` enum('0','1','2','3','4','5','6','7','8','9','10') NOT NULL default '0', `date` int(10) NOT NULL default '0', `postip` varchar(16) NOT NULL default '', `active` enum('Yes','No') NOT NULL default 'Yes', PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;CREATE TABLE `comments_config` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `string` varchar(255) NOT NULL default '', `integer` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;CREATE TABLE `gameplays` ( `id` int(10) NOT NULL auto_increment, `gid` int(10) NOT NULL default '0', `uid` int(10) NOT NULL default '0', `time` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;CREATE TABLE `games` ( `id` int(10) NOT NULL auto_increment, `nameid` varchar(255) NOT NULL default '', `name` varchar(255) NOT NULL default '', `desc` varchar(255) NOT NULL default '', `time` int(10) NOT NULL default '0', `width` int(10) NOT NULL default '0', `height` int(10) NOT NULL default '0', `cat` varchar(255) NOT NULL default '', `rating` decimal(3,2) NOT NULL default '0.00', `type` enum('SWF','extlink','DCR','CustomCode') NOT NULL default 'SWF', `authorsite` varchar(255) NOT NULL default '', `authorname` varchar(255) NOT NULL default '', `gameurl` varchar(255) NOT NULL default '', `code` text NOT NULL, `playcount` int(10) NOT NULL default '0', `weeklyplays` int(10) NOT NULL default '0', `flags` varchar(255) NOT NULL default '', `instructions` text NOT NULL, `keywords` varchar(255) NOT NULL default '', `disphtml` enum('Config','No','Yes') NOT NULL default 'Config', `disphtmlcode` text NOT NULL, `order` int(10) NOT NULL default '0', `active` enum('Yes','No') NOT NULL default 'Yes', PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;CREATE TABLE `games_config` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `string` varchar(255) NOT NULL default '', `integer` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;CREATE TABLE `info` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `string` varchar(255) NOT NULL default '', `integer` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;CREATE TABLE `links` ( `id` int(10) NOT NULL auto_increment, `title` varchar(255) NOT NULL default '', `url` varchar(255) NOT NULL default '', `trackingurl` varchar(255) NOT NULL default '', `desc` varchar(255) NOT NULL default '', `in` int(10) NOT NULL default '0', `out` int(10) NOT NULL default '0', `homepage` enum('Yes','No') NOT NULL default 'Yes', `active` enum('Yes','No') NOT NULL default 'Yes', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;CREATE TABLE `links_config` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `string` varchar(255) NOT NULL default '', `integer` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;CREATE TABLE `members` ( `id` int(10) NOT NULL auto_increment, `username` varchar(16) NOT NULL default '', `password` varchar(32) NOT NULL default '', `email` varchar(255) NOT NULL default '', `emailshow` enum('No','Yes') NOT NULL default 'No', `receiveadminemails` enum('No','Yes') NOT NULL default 'No', `confcode` varchar(32) NOT NULL default '', `active` enum('Unconfirmed','No','Yes') NOT NULL default 'Unconfirmed', `regtime` int(10) NOT NULL default '0', `totalgames` int(10) NOT NULL default '0', `totalcomments` int(10) NOT NULL default '0', `aim` varchar(255) NOT NULL default '', `yahoo` varchar(255) NOT NULL default '', `msn` varchar(255) NOT NULL default '', `icq` varchar(255) NOT NULL default '', `location` varchar(255) NOT NULL default '', `websiteurl` varchar(255) NOT NULL default '', `avatarurl` varchar(255) NOT NULL default '', `info` varchar(255) NOT NULL default '', `admin` enum('No','Yes') NOT NULL default 'No', `favorites` text NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;CREATE TABLE `members_config` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `string` varchar(255) NOT NULL default '', `integer` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;CREATE TABLE `news` ( `id` int(10) NOT NULL auto_increment, `title` varchar(255) NOT NULL default '', `content` text NOT NULL, `date` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;CREATE TABLE `pages` ( `id` int(10) NOT NULL auto_increment, `showinmenu` enum('Yes','No') NOT NULL default 'Yes', `title` varchar(255) NOT NULL default '', `content` text NOT NULL, `keywords` varchar(255) NOT NULL default '', `description` varchar(255) NOT NULL default '', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;CREATE TABLE `pm` ( `id` int(10) NOT NULL auto_increment, `from` int(10) NOT NULL default '0', `to` int(10) NOT NULL default '0', `date` int(10) NOT NULL default '0', `subject` varchar(16) NOT NULL default '', `content` text NOT NULL, `readdate` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;CREATE TABLE `sessions` ( `id` int(10) NOT NULL auto_increment, `userid` int(10) NOT NULL default '0', `ip` varchar(16) NOT NULL default '', `time` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=67 DEFAULT CHARSET=latin1;CREATE TABLE `site_config` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `string` varchar(255) NOT NULL default '', `integer` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;CREATE TABLE `taf_config` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `string` varchar(255) NOT NULL default '', `integer` int(10) NOT NULL default '0', PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;[/code]I get this error:Error 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 '; -- -- Dumping data for table `games` -- INSERT INTO `games` (`id`, `' at line 44 This is a game script and the SQL is to insert games into the database.[attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/ Share on other sites More sharing options...
hvle Posted January 23, 2007 Share Posted January 23, 2007 I used to have error like this with sql dump file. When I remove the ENGINE=MyISAM, it worked fine.I don't really know why, but you can always change the engine type with the phpAdmin interface. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-166811 Share on other sites More sharing options...
cursed Posted January 23, 2007 Author Share Posted January 23, 2007 hmm.. still doesnt work.the above mySQL wasnt the correct one:attached is.[attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-166864 Share on other sites More sharing options...
fenway Posted January 23, 2007 Share Posted January 23, 2007 It's the charset syntax. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-167425 Share on other sites More sharing options...
cursed Posted January 24, 2007 Author Share Posted January 24, 2007 how do i change that?what would i change it to? Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-167783 Share on other sites More sharing options...
fenway Posted January 24, 2007 Share Posted January 24, 2007 There was a syntax change from 3.23 -> 4 -> 5, I think --- don't remember what it is now, check the refman for create table. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-167993 Share on other sites More sharing options...
cursed Posted January 26, 2007 Author Share Posted January 26, 2007 could you give me a bit more information on how to do that? Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-169451 Share on other sites More sharing options...
hvle Posted January 26, 2007 Share Posted January 26, 2007 curse, why don't you just delete the charset entry, it should work. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-169455 Share on other sites More sharing options...
cursed Posted January 26, 2007 Author Share Posted January 26, 2007 so i would change this:[code]) ENGINE=MyISAM AUTO_INCREMENT=1758 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1758 ;[/code]to [code]) AUTO_INCREMENT=1758 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1758 ;[/code]?because it still gives me the same error. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-169479 Share on other sites More sharing options...
hvle Posted January 26, 2007 Share Posted January 26, 2007 no cursed, delete the charset, not the engine.[code]) ENGINE=MyISAM AUTO_INCREMENT=1758 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1758 ;[/code]to:[code]) ENGINE=MyISAM AUTO_INCREMENT=1758 AUTO_INCREMENT=1758 ;[/code] Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-169502 Share on other sites More sharing options...
cursed Posted January 26, 2007 Author Share Posted January 26, 2007 Thanks for the clarification, but once again, I have the same error:Error 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 '; -- -- Dumping data for table `games` -- INSERT INTO `games` (`id`, `' at line 44 Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-170194 Share on other sites More sharing options...
hvle Posted January 27, 2007 Share Posted January 27, 2007 why don't you remove everything and leave only AUTO_INCREMENT statement Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-170235 Share on other sites More sharing options...
cursed Posted January 27, 2007 Author Share Posted January 27, 2007 Still, same problem :(.Im moving my files to a different server, then trying again. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-170540 Share on other sites More sharing options...
shoz Posted January 27, 2007 Share Posted January 27, 2007 If you still have problems post the version of MYSQL that you're using (SELECT VERSION()) and if the sql file you're currently trying to import is different from the last one you posted, attach that as well. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-170553 Share on other sites More sharing options...
cursed Posted January 27, 2007 Author Share Posted January 27, 2007 5.0.27-Debian_0.dotdeb.1Same SQL, im using PHPMiniAdmin Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-170607 Share on other sites More sharing options...
iamgregg Posted January 27, 2007 Share Posted January 27, 2007 Could it be something as simple as stating auto_increment twice?[quote]) ENGINE=MyISAM [b]AUTO_INCREMENT=1758[/b] DEFAULT CHARSET=latin1 [b]AUTO_INCREMENT=1758[/b] ;[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-170627 Share on other sites More sharing options...
shoz Posted January 27, 2007 Share Posted January 27, 2007 [quote author=iamgregg link=topic=123578.msg514878#msg514878 date=1169926981]Could it be something as simple as stating auto_increment twice?[quote]) ENGINE=MyISAM [b]AUTO_INCREMENT=1758[/b] DEFAULT CHARSET=latin1 [b]AUTO_INCREMENT=1758[/b] ;[/quote][/quote]That would have been my guess as well at first glance, but the sql does work in MYSQL 5.0[quote author=cursed link=topic=123578.msg514858#msg514858 date=1169925119]5.0.27-Debian_0.dotdeb.1Same SQL, im using PHPMiniAdmin [/quote]As mentioned above the sql appears fine. I've tested it in MYSQL 5.0.27. I have to assume PHPminiadmin is parsing the file incorrectly somehow and sending a syntactically incorrect query when doing the import.I recommend you import this file yourself using one of the methods below.1) open a terminal and run[code]mysql -uusername -ppassword databasename < /path/to/sql.txt [/code]2) Login to the server with mysql monitor[code]mysql -u username -pEnter password at prompt[/code]Then issue the following query after selecting the database[code]SOURCE /path/to/sql.txt[/code]You can try the "SOURCE" query using php...admin but I don't recall right now whether or not it's a client specific query. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-170655 Share on other sites More sharing options...
fenway Posted January 30, 2007 Share Posted January 30, 2007 Isolate which table is causing the problem. Quote Link to comment https://forums.phpfreaks.com/topic/35291-whats-wrong-with-this-mysql/#findComment-172916 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.