Jump to content

Table syntax error


jer37

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.