fix: bad cursor state

This commit is contained in:
Guillermo Pages
2021-09-13 19:49:50 +02:00
parent a2a07ceccf
commit 881693402a

View File

@@ -32,15 +32,19 @@ class Connection
throw new SqlException('SQL There was an error executing the request');
}
if (strpos($sql, "SELECT") !== false) {
$rows = $statement->fetchAll($fetchMode);
if (!is_array($rows)) {
throw new SqlException('PDO Unable to retrieve the result');
}
return new OdbcResultSet($rows);
}
$statement->closeCursor();
return true;
}
/**
* Replaces de old execute($sql, $throwErrors=false)
*