The problem
During a very simple insert query, using PDO with an ODBC driver for a DB2 database, the driver returns the following error:
SQLSTATE[HY010]: Function sequence error: 0 [Microsoft][Driver Manager ODBC] [italian message translation] (SQLExecute[0] at ext\pdo_odbc\odbc_stmt.c:254)
The query itself is a prepared statement insert, with strings and dates. [italian message translation] just says "Function sequence error" in italian.
The research
This SO question reports the same problem, but occurred during a SELECT query, which is not my case
This PHP bug report reports the same problem, but I've determined that's not my case either.
The question
Why does a simple insert cause a function sequence error with SQLSTATE[HY010]?
解决方案
Reading from the PHP bug report, users have reported that the issue