From 7a6ec6b76711973e92ea09c240d57962e5e1a7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AA=85=EB=9E=91=ED=8F=90=EC=9D=B8?= Date: Mon, 30 Mar 2020 12:29:55 +0900 Subject: [PATCH] Update PDO.class.php fix select statement new line problem. like " select table1.*, table2.columns from table1 inner join table2 .... "; --- src/PDO.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PDO.class.php b/src/PDO.class.php index 4e35cb5..ad19a54 100644 --- a/src/PDO.class.php +++ b/src/PDO.class.php @@ -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') {