]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/database/class_BaseDatabaseWrapper.php
To much 'Deny from all' removed :(
[core.git] / inc / classes / main / database / class_BaseDatabaseWrapper.php
index e86b0c65de99340025b03d4edc6da29daabc1d0d..a7debada0d6b27942537da9badf56a553c047d60 100644 (file)
@@ -30,7 +30,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
        /**
         * Current table name to use
         */
-       private $tableName = "unknown";
+       private $tableName = 'unknown';
 
        /**
         * Protected constructor
@@ -72,7 +72,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                // Does this key exists in cache?
                if ($this->cacheInstance->offsetExists($cacheKey)) {
                        // Then use this result
-                       $result = $cacheInstance->offsetGet($cacheKey);
+                       $result = $this->cacheInstance->offsetGet($cacheKey);
                } else {
                        // Now it's time to ask the database layer for this select statement
                        $result = $this->getDatabaseInstance()->doSelectByTableCriteria($this->getTableName(), $criteriaInstance);
@@ -84,7 +84,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                        } else {
                                // This invalid result must be wrapped
                                $result = array(
-                                       'status'                => "invalid",
+                                       'status'                => 'invalid',
                                        'exception'             => $this->getDatabaseInstance()->getLastException()
                                );
                        }
@@ -104,7 +104,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
         * @return      $numRows                        Numbers of rows of database entries
         */
        public function doSelectCountByCriteria (Criteria $criteriaInstance) {
-               // Total numbers is zero by default
+               // Total numbers is -1 so we can distinglish between failed and valid queries
                $numRows = 0;
 
                // Get the result from above method