fix: discarding UPDATE OUTPUT

This commit is contained in:
Guillermo Pages
2021-09-27 11:36:32 +02:00
parent 2a6e034f01
commit e65701fa56

View File

@@ -32,7 +32,7 @@ class Connection
throw new SqlException('SQL There was an error executing the request');
}
if (strpos($sql, "SELECT") !== false) {
if (strpos($sql, "SELECT") !== false || strpos($sql, "OUTPUT INSERTED") !== false) {
$rows = $statement->fetchAll($fetchMode);
if (!is_array($rows)) {
throw new SqlException('PDO Unable to retrieve the result');