Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1136 - Column count doesn't match value count at row 1


Dayclone

Recommended Posts

Hey guys I need help with this coding...

 

 

This is the error I'm getting.

 

1136 - Column count doesn't match value count at row 1

 

insert into products (products_quantity, products_model, products_image, products_price, products_date_added, products_date_available, products_weight, products_length, products_width, products_height, products_ready_to_ship, products_status, products_tax_class_id, manufacturers_id) values ('', '', '', '', now(), null, '', '0', '', '0', '', '0', '0')

 

[TEP STOP]

 

This is how the code looks like:

 

			tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_price, products_date_added, products_date_available, products_weight, products_length, products_width, products_height, products_ready_to_ship, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . "', '0', '" . "', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
		$dup_products_id = tep_db_insert_id();

 

I know its missing something but when I fixed it ti wouldn't duplicate the product so my values must be wrong?

 

Thanks,

Steve

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...