Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Attribute INSERT error


OSC-Sevilla

Recommended Posts

Posted

SEE IMAGES ATTACHED

 

I think its an SQL ERROR... PLs COmment.

 

I get the follwing error on "INSERT"

 

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

 

insert into products_attributes values (null, '307', '2', '23', '0', '+')

 

[TEP STOP]

Posted

insert into products_attributes values (null, '307', '2', '23', '0', '+')

 

That's why it's so much better coding practice to explicitly list the fields being updated (before the VALUES clause) -- it eliminates the chances of this mismatch happening.

 

Was this core product code, an add-on, or your own code?

Posted

This was an addon "Sort attributes" - it added a line to my sql that messed it up - removed it (back to stock) and all GREAT!

 

 

Does anyone know a mod that will allow you to add your atrributes on the product entry page? that would save me lots of back and fourth, dito for documents manager ---- just a ?

 

 

I wish i had time to code out the "Products specifications CONTRIB - "

 

Thanks

  • 1 month later...
Posted

I'm getting the same problem

 

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

 

insert into products_attributes values (null, '54', '2', '2', '0', '+', '0')

 

[TEP STOP]

 

Can you tell me what your solution was/is?

Posted

As of osC 2.3.1, there are still only 6 fields defined for that table, and you have seven values. Did you add an add-on/mod that adds another field to that table, and neglect to run some code to update the database (actually add the field to the table)?

Posted
As of osC 2.3.1, there are still only 6 fields defined for that table, and you have seven values. Did you add an add-on/mod that adds another field to that table, and neglect to run some code to update the database (actually add the field to the table)?

 

I followed the steps from Easy Populate 2.77a setup and Product Attributes Sort Order v1.83a ... Everything seem to be working well...

 

 

I added

This is the structure attribute_sort but I think I can remove it ???

 

 

 

Field Type Collation Attributes Null Default

attribute_sort int(10) UNSIGNED No 0

products_attributes_id int(11) No auto_increment

products_id options_id int(11) No

options_values_id int(11) No

options_values_price "decimal(15,4)" No

price_prefix char(1) latin1_swedish_ci No

products_options_sort_order int(10) UNSIGNED No 0

Posted

Try putting the new field in last, after the original 6 fields (probably have to add a comma after the 6th field).

 

Yet again, reason to explicitly list all the field names in the INSERT statement!

Posted
Try putting the new field in last, after the original 6 fields (probably have to add a comma after the 6th field).

 

Yet again, reason to explicitly list all the field names in the INSERT statement!

 

Will try thanks

Archived

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

×
×
  • Create New...