Jump to content

MYSQL table creation problum - any help much appreciated


arun4444

Recommended Posts

hello, when i try to import sql (spplied with a php nuke mod) i get the following error:

 

Code i am trying to import:-

 

CREATE TABLE nuke_simpleshop (
id int(255) NOT NULL auto_increment,
sku varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
description longtext NOT NULL default '',
price varchar(30) NOT NULL default '',
image varchar(30) NOT NULL default '',
category varchar(30) NOT NULL default '',
spotlight varchar(30) NOT NULL default '',
condition varchar(30) NOT NULL default '',
status varchar(30) NOT NULL default '',
provider varchar(30) NOT NULL default '',
contact varchar(30) NOT NULL default '',
deal varchar(30) NOT NULL default '',
hits int(255) NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

 

Error I get:-

 

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 'condition varchar(30) NOT NULL default '',
status varchar(30) NOT NULL default ' at line 10

Link to comment
Share on other sites

There are some reserved keywords in MySQL.  I believe "status" is one of them.  Use backticks around that word to use it as a column name (`status`, backticks, shift-tilde~, not single quotes).  Check the manual for a list of reserved words.

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.