diff options
author | Indieteq <admin@indieteq.com> | 2014-07-01 11:37:16 +0200 |
---|---|---|
committer | Indieteq <admin@indieteq.com> | 2014-07-01 11:37:16 +0200 |
commit | 66e72318fbac670abe640d62eaf0c87ef9498fb3 (patch) | |
tree | c734703143af163c313bc93ca07bb96eae5390b1 | |
parent | 3907eed1901db8f8e387a4638bc8b8af40a507de (diff) | |
download | php-mysql-pdo-database-class-66e72318fbac670abe640d62eaf0c87ef9498fb3.zip php-mysql-pdo-database-class-66e72318fbac670abe640d62eaf0c87ef9498fb3.tar.gz php-mysql-pdo-database-class-66e72318fbac670abe640d62eaf0c87ef9498fb3.tar.bz2 |
Update Db.class.php
Edited some comments
-rw-r--r-- | Db.class.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Db.class.php b/Db.class.php index fe11d36..9040728 100644 --- a/Db.class.php +++ b/Db.class.php @@ -157,7 +157,7 @@ class DB } } /** - * If the SQL query contains a SELECT statement it returns an array containing all of the result set row + * If the SQL query contains a SELECT or SHOW statement it returns an array containing all of the result set row * If the SQL statement is a DELETE, INSERT, or UPDATE statement it returns the number of affected rows * * @param string $query @@ -171,8 +171,9 @@ class DB $this->Init($query,$params); - # The first six letters of the sql statement -> insert, select, etc... - $rawStatement = explode(" ",$query); + $rawStatement = explode(" ", $query); + + # Which SQL statement is used $statement = strtolower($rawStatement[0]); if ($statement === 'select' || $statement === 'show') { |