Fix for broken SQL queries
authorRoland Häder <roland@mxchange.org>
Wed, 11 Mar 2009 17:24:05 +0000 (17:24 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 11 Mar 2009 17:24:05 +0000 (17:24 +0000)
inc/mysql-manager.php

index 57ca77e..d8cbc5e 100644 (file)
@@ -1061,7 +1061,7 @@ function REMOVE_RECEIVER (&$receivers, $key, $uid, $pool_id, $stats_id="", $bonu
 function GET_TOTAL_DATA ($search, $tableName, $lookFor = "id", $whereStatement = "userid", $countRows = false, $add = "") {
        $ret = 0;
        //* DEBUG: */ echo $search."/".$tableName."/".$lookFor."/".$whereStatement."/".$add."<br />\n";
-       if (empty($search)) {
+       if ((empty($search)) && ($search != "0")) {
                // Count or sum whole table?
                if ($countRows === true) {
                        // Count whole table