Wednesday, June 24, 2015

SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

Hello,

Got this error message

SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

We tried everything to insert in one table but this error didn't budged even for the simplest query we  wrote.

Then I found that there was a "TRIGGER" applied on this table which on insertion updates another table.

So the problem was with the stored procedure. There was some additional field in it.

I discovered the root cause as soon as I deleted the Trigger.

So the issue was with the error message, this error was not pin pointing that the field was missing on which table, due to the language of the error it seems like the error is with the immediate table but actually it can be with a connected one.

Hope this will help someone.

Thanx
Anshumaan Bakshi