Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

column count doesnt match


Vinayak

Recommended Posts

HI,

 

When submitting a written review I get this:

 

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

 

insert into reviews (products_id, customers_id, customers_name, reviews_rating, date_added) values ('80', '2', 'Vinayak 5', now())

 

[TEP STOP]

 

 

Whats that about?

 

PLease help

Link to comment
Share on other sites

Check around line 48 in catalog/product_reviews_write.php and see if the "insert" statement has been "modified". Some how the "lastname and rating" are being combined in your insert and should be seperate values.

 

tep_db_query("insert into " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, reviews_rating, date_added) values ('" . (int)$HTTP_GET_VARS['products_id'] . "', '" . (int)$customer_id . "', '" . tep_db_input($customer['customers_firstname']) . ' ' . tep_db_input($customer['customers_lastname']) . "', '" . tep_db_input($rating) . "', now())");

 

HTH

Tom

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...