Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Prob with Quantity for Product Attributes contrib


philip56

Recommended Posts

Posted

I am trying to install contribution 3302, Quantity for Product Attributes. The last step is to run the folling SQL query.

 

ALTER TABLE 'products_attributes' ADD 'options_quantity' INT( 11 ) ;

 

This generates the following error

 

1064 - You have an error in your SQL syntax. Check the manual that..........for the right syntax to use near ' ' product_options' ADD 'options_quantity' INT( 11 ) at line 1

 

I know next to nothing about SQL but I have checked th on-line manual and can see nothing wrong (except possibly the inverted commas - although I still get the error without them)

 

Needless to say the following error is generated on pressing the "Add to Cart" button in Oscommerce

 

1054 - Unknown column 'options _quantity' in 'field list'

 

Thank you in anticipation of your help

 

Philip

Posted

Apostrophes denote strings. Backticks denote database, table, and field names. In this case, you do not need the backticks around the table name, or the field name because neither of them are a reserved word. Either of the below should work:

 

 

ALTER TABLE `products_attributes` ADD `options_quantity` INT( 11 ) ;

 

ALTER TABLE products_attributes ADD options_quantity INT( 11 ) ;

Contributions

 

Discount Coupon Codes

Donations

Posted
Apostrophes denote strings.  Backticks denote database, table, and field names.  In this case, you do not need the backticks around the table name, or the field name because neither of them are a reserved word.  Either of the below should work:

ALTER TABLE `products_attributes` ADD `options_quantity` INT( 11 ) ;

 

ALTER TABLE products_attributes ADD options_quantity INT( 11 ) ;

 

 

Thank you very much for that. I'm learning all the time!!

 

Philip

Archived

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

×
×
  • Create New...