zeus_r6 Posted April 19, 2014 Share Posted April 19, 2014 Any idea what is causing this while attempting to add an attribute? and a possible workaround? 1136 - Column count doesn't match value count at row 1 insert into products_attributes values (null, '129', '10', '48', '0', '+') [TEP STOP] Thanks in advance! Link to comment Share on other sites More sharing options...
zeus_r6 Posted April 19, 2014 Author Share Posted April 19, 2014 I can see looking in phpmyadmin that it's inserting a null value into the database when trying to create the new attribute. Ideas what is causing it to do that? Link to comment Share on other sites More sharing options...
zeus_r6 Posted April 19, 2014 Author Share Posted April 19, 2014 Disregard figured it out Link to comment Share on other sites More sharing options...
MrPhil Posted April 22, 2014 Share Posted April 22, 2014 The "null" would be for an autoincremented field -- you don't want to give it a value, but to let it figure it out on its own. The error message was because you had a different number of fields defined in the table than the number of values you gave. This is an example of very poor coding practice -- you should always give a list of fields so that it's easy to see that values and fields match up (and you can let unlisted fields, such as an autoincremented ID field, take their default values). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.