PDO does not throw exception with multiple queries
How can I get PDO to throw an exception when executing multiple queries? If I run the erroneous sql by itself: $execute($ddl_partial); $execute($insert); Then I get the expected error: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 207 [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid column name 'other'. (SQLExecute[207] at /build/php7.0-41GaEn/php7.0-7.0.8/ext/pdo_odbc/odbc_stmt.c:260) However, if I run some good SQL first and follow it up with the bad, then it just swallows the error and all appears fine. But looking at the database afterwards