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 e86b0c65de99340025b03d4edc6da29daabc1d0d..494d994b43f685df2fb3514a61b5ab9ad3a2e2ed 100644 (file)
@@ -30,7 +30,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
        /**
         * Current table name to use
         */
        /**
         * Current table name to use
         */
-       private $tableName = "unknown";
+       private $tableName = 'unknown';
 
        /**
         * Protected constructor
 
        /**
         * Protected constructor
@@ -84,7 +84,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem {
                        } else {
                                // This invalid result must be wrapped
                                $result = array(
                        } else {
                                // This invalid result must be wrapped
                                $result = array(
-                                       'status'                => "invalid",
+                                       'status'                => 'invalid',
                                        'exception'             => $this->getDatabaseInstance()->getLastException()
                                );
                        }
                                        '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) {
         * @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
                $numRows = 0;
 
                // Get the result from above method