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 57ca77e32a66613d94794caec488a6c089ea547a..d8cbc5e2d12965693dac7f29df45025aa7894a5d 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";
 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
                // Count or sum whole table?
                if ($countRows === true) {
                        // Count whole table