AllTheAbove Posted July 19, 2005 Share Posted July 19, 2005 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 More sharing options...
Guest Posted July 19, 2005 Share Posted July 19, 2005 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 <{POST_SNAPBACK}> that last bit should be ... store_id int NOT NULL default '0', PRIMARY KEY ( products_id ) , .... Link to comment Share on other sites More sharing options...
AllTheAbove Posted July 19, 2005 Author Share Posted July 19, 2005 that last bit should be ... store_id int NOT NULL default '0', PRIMARY KEY ( products_id ) , .... <{POST_SNAPBACK}> DOH! a misplaced , Thanks bunches! Lori Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.