If no valid entry (e.g. failed query) is counted, this does now return -1
[core.git] / inc / classes / main / database / class_BaseDatabaseWrapper.php
index e86b0c6..494d994 100644 (file)
@@ -30,7 +30,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
        /**
         * Current table name to use
         */
-       private $tableName = "unknown";
+       private $tableName = 'unknown';
 
        /**
         * Protected constructor
@@ -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