X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=a54357dafddb326f3689d6cec0ff06e5df95cffc;hp=717865cbaaec5e2767ff6afeb1b349cff605c481;hb=c317b059bf0a1acb3171c4e3255afcce48795947;hpb=811c2a74188a97591fb05ed1dd3d1929b8bc23aa
diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php
index 717865cbaa..a54357dafd 100644
--- a/inc/mysql-manager.php
+++ b/inc/mysql-manager.php
@@ -623,15 +623,15 @@ function IS_MEMBER()
//* DEBUG: */ echo __LINE__."!!!
";
destroy_user_session();
- // Remove array elements to prevent errors
- unset($GLOBALS['userid']);
+ // Reset userid
+ $GLOBALS['userid'] = 0;
}
} else {
// Cookie data is invalid!
//* DEBUG: */ echo __LINE__."***
";
- // Remove array elements to prevent errors
- unset($GLOBALS['userid']);
+ // Reset userid
+ $GLOBALS['userid'] = 0;
}
// Free memory
@@ -641,8 +641,8 @@ function IS_MEMBER()
//* DEBUG: */ echo __LINE__."///
";
destroy_user_session();
- // Remove array elements to prevent errors
- unset($GLOBALS['userid']);
+ // Reset userid
+ $GLOBALS['userid'] = 0;
}
// Cache status
@@ -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."*
\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;
}
/**