Skip to content

Commit

Permalink
Merge pull request #28 from merong/patch-1
Browse files Browse the repository at this point in the history
Update PDO.class.php
  • Loading branch information
lincanbin authored Mar 30, 2020
2 parents fbf9e8b + 7a6ec6b commit 00cd384
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PDO.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function iterator($query, $params = null, $fetchMode = PDO::FETCH_ASSOC)
$query = trim($query);
$rawStatement = explode(" ", $query);
$this->Init($query, $params, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
$statement = strtolower($rawStatement[0]);
$statement = strtolower(trim($rawStatement[0]));
if ($statement === 'select' || $statement === 'show' || $statement === 'call' || $statement === 'describe') {
return new PDOIterator($this->sQuery, $fetchMode);
} elseif ($statement === 'insert' || $statement === 'update' || $statement === 'delete') {
Expand Down

0 comments on commit 00cd384

Please sign in to comment.