ghostbone Posted February 26, 2007 Share Posted February 26, 2007 I know this has been done here enough times. Ive been thru most of the threads but still cant figure out whats wrong with it. I keep getting this error, while adding the attributes to my products. 1136 - Column count doesn't match value count at row 1 insert into products_attributes values ('', '431', '2', '31', '', '+') [TEP STOP] Link to comment Share on other sites More sharing options...
ghostbone Posted February 26, 2007 Author Share Posted February 26, 2007 anyone? Link to comment Share on other sites More sharing options...
ghostbone Posted February 27, 2007 Author Share Posted February 27, 2007 I think I mightve had figured it out, but not sure yet Link to comment Share on other sites More sharing options...
Nullachtfuffzehn Posted February 28, 2007 Share Posted February 28, 2007 I think I mightve had figured it out, but not sure yet Can you post the complete query please? Would help to figure out what's going wrong. Seems that the numder of columns you've specified doesn't match the number of colums of the values. Link to comment Share on other sites More sharing options...
jonquil Posted February 28, 2007 Share Posted February 28, 2007 Maybe this will help (from another thread): http://www.oscommerce.com/forums/index.php?sho...st&p=877716 jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ghostbone Posted February 28, 2007 Author Share Posted February 28, 2007 Can you post the complete query please? Would help to figure out what's going wrong. Seems that the numder of columns you've specified doesn't match the number of colums of the values. tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $HTTP_POST_VARS['products_id'] . "', '" . $HTTP_POST_VARS['options_id'] . "', '" . $HTTP_POST_VARS['values_id'][$i] . "', '" . $HTTP_POST_VARS['value_price'] . "', '" . $HTTP_POST_VARS['price_prefix'] . "', '" . $HTTP_POST_VARS['type_id'] . "', '" . $HTTP_POST_VARS['options_values_qty'] . "', '" . $HTTP_POST_VARS['attribute_order'] . "', '" . $HTTP_POST_VARS['collegamento'] . "')"); Are you talking about this bit? Link to comment Share on other sites More sharing options...
ghostbone Posted February 28, 2007 Author Share Posted February 28, 2007 Maybe this will help (from another thread): http://www.oscommerce.com/forums/index.php?sho...st&p=877716 jon Ive already replied to that thread. That bit of code the person posted is no where to be found. Link to comment Share on other sites More sharing options...
jonquil Posted February 28, 2007 Share Posted February 28, 2007 Ah jeez, sorry to make you go in a circle. I didn't see your post over there. :'( jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ghostbone Posted March 2, 2007 Author Share Posted March 2, 2007 I think Ill end up ruinin my database at this rate. Yes, its backed up but still Link to comment Share on other sites More sharing options...
ghostbone Posted March 3, 2007 Author Share Posted March 3, 2007 I still cant figure it out :S Link to comment Share on other sites More sharing options...
jonquil Posted March 3, 2007 Share Posted March 3, 2007 Lines 54-61 or so, do you see this in your admin/products_attributes.php: case 'add_product_attributes': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']); $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']); $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']); $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']); tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ghostbone Posted March 3, 2007 Author Share Posted March 3, 2007 case 'add_product_attributes': for ($i=0;$i<sizeof($HTTP_POST_VARS['values_id']);$i++) { tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $HTTP_POST_VARS['products_id'] . "', '" . $HTTP_POST_VARS['options_id'] . "', '" . $HTTP_POST_VARS['values_id'][$i] . "', '" . $HTTP_POST_VARS['value_price'] . "', '" . $HTTP_POST_VARS['price_prefix'] . "', '" . $HTTP_POST_VARS['type_id'] . "', '" . $HTTP_POST_VARS['options_values_qty'] . "', '" . $HTTP_POST_VARS['attribute_order'] . "', '" . $HTTP_POST_VARS['collegamento'] . "')"); $products_attributes_id = tep_db_insert_id(); if ((DOWNLOAD_ENABLED == 'true') && $HTTP_POST_VARS['products_attributes_filename'] != '') { tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " values (" . $products_attributes_id . ", '" . $HTTP_POST_VARS['products_attributes_filename'] . "', '" . $HTTP_POST_VARS['products_attributes_maxdays'] . "', '" . $HTTP_POST_VARS['products_attributes_maxcount'] . "')"); } } I see this. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.