PDA

View Full Version : problem with database


november11
10-18-2006, 05:34 PM
I have tried to import a file called "CubeCart.sql" into my database from my CubeCart installation files and every time I get the following error message. What's wrong and how do I correct it?

Thank you, Marie

Server: localhost Database: psychic1_cubecart
Error SQL query:
#
# CUBECART SQL STRUCTURE DUMP
# --------------------------------------------------------
#
# Table structure for table 'store_category'
#
CREATE TABLE store_category(

category text NOT NULL ,
cat_id int( 16 ) NOT NULL AUTO_INCREMENT ,
cat_father_id int( 16 ) NOT NULL default '0',
cat_image varchar( 250 ) NOT NULL default '',
per_ship decimal( 20, 2 ) NOT NULL default '0.00',
item_ship decimal( 20, 2 ) NOT NULL default '0.00',
item_int_ship decimal( 20, 2 ) NOT NULL default '0.00',
per_int_ship decimal( 20, 2 ) NOT NULL default '0.00',
PRIMARY KEY ( cat_id, cat_id )
) TYPE = MYISAM ;



MySQL said:

#1060 - Duplicate column name 'cat_id'
[ Back ]

Aaron
10-18-2006, 10:52 PM
Can you provide the exact details of how you tried to import the file?

linFox
10-19-2006, 03:09 AM
It looks like you've tried to declare the same Primary Key column twice.

Try replacing the line:
PRIMARY KEY ( cat_id, cat_id )
with
PRIMARY KEY ( cat_id )