fix: bad cursor state
This commit is contained in:
@@ -32,13 +32,17 @@ class Connection
|
||||
throw new SqlException('SQL There was an error executing the request');
|
||||
}
|
||||
|
||||
$rows = $statement->fetchAll($fetchMode);
|
||||
|
||||
if (!is_array($rows)) {
|
||||
throw new SqlException('PDO Unable to retrieve the result');
|
||||
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);
|
||||
}
|
||||
|
||||
return new OdbcResultSet($rows);
|
||||
$statement->closeCursor();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user