]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Fixes for wrong config entries
[mailer.git] / inc / mysql-manager.php
index 717865cbaaec5e2767ff6afeb1b349cff605c481..83677bd75b389c1e8665beb7dfaf5a19f0acca78 100644 (file)
@@ -1060,8 +1060,7 @@ function REMOVE_RECEIVER(&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fal
        return $ret;
 }
 //
-function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid", $onlyRows=false)
-{
+function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid", $onlyRows=false) {
        $ret = 0;
        if ($onlyRows) {
                // Count rows
@@ -1075,15 +1074,16 @@ function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid",
 
        // Load row
        list($ret) = SQL_FETCHROW($result);
-       //* DEBUG: */ echo __LINE__."*".$DATA."/".$search."/".$tableName."/".$ret."*<br />\n";
+
+       // Free result
        SQL_FREERESULT($result);
-       if (empty($ret)) {
-               if (($lookFor == "counter") || ($lookFor == "id")) {
-                       $ret = 0;
-               } else {
-                       $ret = "0.00000";
-               }
-       }
+
+       // Fix empty values
+       if ((empty($ret)) && ($lookFor != "counter") && ($lookFor != "id") && ($lookFor != "userid")) {
+               $ret = "0.00000";
+       } // END - if
+
+       // Return value
        return $ret;
 }
 /**