TheWebFanatik Posted June 24, 2011 Share Posted June 24, 2011 Hello, I'm trying to install a database .sql file & when I upload it I get the following: Error SQL query: -- -- Dumping data for table `7stat` -- INSERT INTO `7stat` ( `usrid` , `date` , `num` , `hits_delivered` ) VALUES -- -------------------------------------------------------- -- -- Table structure for table `7statsite` -- CREATE TABLE IF NOT EXISTS `7statsite` ( `site_id` int( 11 ) default NULL , `date` date default NULL , `num` int( 11 ) default NULL , KEY `site_id_date` ( `site_id` , `date` ) , ) ENGINE = MYISAM DEFAULT CHARSET = latin1; 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 'CREATE TABLE IF NOT EXISTS `7statsite` ( `site_id` int(11) default NULL, `' at line 9 the system is: MySQL version 5.0.92-community-log I cannot seem to see the error it mentions. Thank you, Joseph Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/ Share on other sites More sharing options...
gizmola Posted June 24, 2011 Share Posted June 24, 2011 Some how you got a spurious comma in your create statement: KEY `site_id_date` ( `site_id` , `date` ) , That comma does not belong. It should just be: KEY `site_id_date` ( `site_id` , `date` ) Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234217 Share on other sites More sharing options...
TheWebFanatik Posted June 24, 2011 Author Share Posted June 24, 2011 Thank you! That did the trick!! Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234438 Share on other sites More sharing options...
TheWebFanatik Posted June 24, 2011 Author Share Posted June 24, 2011 I thought that had fixed it but now I'm getting this: Query: -- -- INSERT INTO `7stat` (`usrid`, `date`, `num`, `hits_delivered`) VALUES -- -- CREATE TABLE IF NOT EXISTS `7statsite` ( `siteid` int(11) default NULL, `date` date default NULL, `num` int(11) default NULL, KEY `siteid_date` (`siteid`,`date`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; MySQL: 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 'CREATE TABLE IF NOT EXISTS `7statsite` ( `siteid` int(11) default NULL, `dat' at line 6 Thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234485 Share on other sites More sharing options...
gizmola Posted June 24, 2011 Share Posted June 24, 2011 NSERT INTO `7stat` (`usrid`, `date`, `num`, `hits_delivered`) VALUES That line is incomplete. I thought you intentionally removed some of it for some reason. There is nothing left of value there, just delete the line. Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234528 Share on other sites More sharing options...
TheWebFanatik Posted June 24, 2011 Author Share Posted June 24, 2011 NSERT INTO `7stat` (`usrid`, `date`, `num`, `hits_delivered`) VALUES That line is from the table before this table. That's just what the error message showed. Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234530 Share on other sites More sharing options...
gizmola Posted June 24, 2011 Share Posted June 24, 2011 Please copy and paste the exact script here. Do not omit or edit anything. I took the script you provided, made the edit i recommended and created the table last night. There is something that doesn't match up if you're getting an error. Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234533 Share on other sites More sharing options...
TheWebFanatik Posted June 25, 2011 Author Share Posted June 25, 2011 Okay, I've attached the file for you to look at. Thanks a bunch! [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234583 Share on other sites More sharing options...
TheWebFanatik Posted June 25, 2011 Author Share Posted June 25, 2011 I think I have it.. Thank you!! Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234593 Share on other sites More sharing options...
gizmola Posted June 26, 2011 Share Posted June 26, 2011 Glad you sorted it. Quote Link to comment https://forums.phpfreaks.com/topic/240262-mysql-install-error/#findComment-1234844 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.