Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL help please


AllTheAbove

Recommended Posts

I was uploading oscommerce.sql and received an SQL error.

 

Any help sorting this out would be greatly appreciated.

 

CREATE TABLE products(

 

products_id int NOT NULL AUTO_INCREMENT ,

products_quantity int( 4 ) NOT NULL ,

products_model varchar( 12 ) ,

products_image varchar( 64 ) ,

products_price decimal( 15, 4 ) NOT NULL ,

products_date_added datetime NOT NULL ,

products_last_modified datetime,

products_date_available datetime,

products_weight decimal( 5, 2 ) NOT NULL ,

products_status tinyint( 1 ) NOT NULL ,

products_tax_class_id int NOT NULL ,

manufacturers_id int NULL ,

products_ordered int NOT NULL default '0',

store_id int NOT NULL ,

default '0' PRIMARY KEY ( products_id ) ,

KEY idx_products_date_added( products_date_added )

)

 

#1064 - You have an error in your SQL syntax; 'default '0'

PRIMARY KEY (products_id),

KEY idx_products_da

 

Thanks

Lori

Link to comment
Share on other sites

I was uploading oscommerce.sql and received an SQL error.

 

Any help sorting this out would be greatly appreciated.

 

CREATE TABLE products(

 

products_id int NOT NULL AUTO_INCREMENT ,

products_quantity int( 4 ) NOT NULL ,

products_model varchar( 12 ) ,

products_image varchar( 64 ) ,

products_price decimal( 15, 4 ) NOT NULL ,

products_date_added datetime NOT NULL ,

products_last_modified datetime,

products_date_available datetime,

products_weight decimal( 5, 2 ) NOT NULL ,

products_status tinyint( 1 ) NOT NULL ,

products_tax_class_id int NOT NULL ,

manufacturers_id int NULL ,

products_ordered int NOT NULL default '0',

store_id int NOT NULL ,

default '0' PRIMARY KEY ( products_id ) ,

KEY idx_products_date_added( products_date_added )

)

 

#1064 - You have an error in your SQL syntax;  'default '0'

  PRIMARY KEY (products_id),

  KEY idx_products_da

 

Thanks

Lori

 

 

that last bit should be

 

...

store_id int NOT NULL default '0',

PRIMARY KEY ( products_id ) ,

....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...