philip56 Posted September 22, 2005 Posted September 22, 2005 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
kgt Posted September 22, 2005 Posted September 22, 2005 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
philip56 Posted September 22, 2005 Author Posted September 22, 2005 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 ) ; <{POST_SNAPBACK}> Thank you very much for that. I'm learning all the time!! Philip
Recommended Posts
Archived
This topic is now archived and is closed to further replies.