From 9ccb058200b0b149e6ade3ed4137cbe05e59e681 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 28 May 2010 02:30:41 +0000 Subject: [PATCH] If no valid entry (e.g. failed query) is counted, this does now return -1 --- inc/classes/main/database/class_BaseDatabaseWrapper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/classes/main/database/class_BaseDatabaseWrapper.php b/inc/classes/main/database/class_BaseDatabaseWrapper.php index e86b0c65..494d994b 100644 --- a/inc/classes/main/database/class_BaseDatabaseWrapper.php +++ b/inc/classes/main/database/class_BaseDatabaseWrapper.php @@ -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 -- 2.30.2