From: Roland Häder Date: Fri, 28 May 2010 02:30:41 +0000 (+0000) Subject: If no valid entry (e.g. failed query) is counted, this does now return -1 X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=9ccb058200b0b149e6ade3ed4137cbe05e59e681 If no valid entry (e.g. failed query) is counted, this does now return -1 --- 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