jer37 Posted September 27, 2010 Share Posted September 27, 2010 I am using xammp for my local server. Also using Mysql version 5.1. I am trying to create the following table: ---------------------------------------------- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Table structure for table `printer_category` -- CREATE TABLE IF NOT EXISTS `printer_category` ( `printer_category_id` int(11) NOT NULL auto_increment, `parent_id` int(11) NOT NULL, `category_name` varchar(255) NOT NULL, `lablename` varchar(255) NOT NULL, `productids` text NOT NULL, `status` enum('Y','N') NOT NULL default 'Y', PRIMARY KEY (`printer_category_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3018 ; -- -- Dumping data for table `printer_category` -- INSERT INTO `printer_category` (`printer_category_id`, `parent_id`, `category_name`, `lablename`, `productids`, `status`) VALUES (1, 0, 'Filter', 'Filter', '', 'Y'), ------------------------------------------------------------ It looks like a version problem but being a Mysql amateur I cannot find the syntax problem. The error message I get is: ------------------------------------------------------------- Error SQL query: -- -- Dumping data for table `printer_category` -- INSERT INTO `printer_category` ( `printer_category_id` , `parent_id` , `category_name` , `lablename` , `productids` , `status` ) VALUES ( 1, 0, 'Filter', 'Filter', '', 'Y' ) , 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 '' at line 6 ------------------------ Where is the error or what is the correct syntax.? jer37 PS. Just joined the forum, glad to be here Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted September 27, 2010 Share Posted September 27, 2010 There's an extraneous comma at the end of the INSERT query, after the closing parenthesis. Quote Link to comment 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.