Commit 62f4b9fd authored by Bong Cosca's avatar Bong Cosca
Browse files

Bug fix: DB Exec does not return affected row if query contain subselect (Issue #437)

parent ab2adda4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -148,8 +148,8 @@ class SQL extends \PDO {
						$this->rollback();
					user_error('PDOStatement: '.$error[2]);
				}
				if (preg_match(
					'/\b(?:CALL|EXPLAIN|SELECT|PRAGMA|SHOW|RETURNING)\b/i',
				if (preg_match('/^\s*'.
					'(?:CALL|EXPLAIN|SELECT|PRAGMA|SHOW|RETURNING)\b/is',
					$cmd)) {
					$result=$query->fetchall(\PDO::FETCH_ASSOC);
					$this->rows=count($result);