From: Roland Häder Date: Sat, 4 Oct 2008 11:57:52 +0000 (+0000) Subject: More fixes for rallye X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=c1c8a07bfbee443ed9c34e235a368e6eefbe5358 More fixes for rallye --- diff --git a/inc/databases.php b/inc/databases.php index eacf64ac61..a8a6a86fc1 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "440"); +define('CURR_SVN_REVISION', "441"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index d4e61658fa..523ff1a958 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -243,7 +243,8 @@ if (isset($_POST['edit'])) } // Get user points - $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); + $points = GET_TOTAL_DATA($uid, "user_points", "points", "userid", false, " AND ref_depth=1 LIMIT 1"); + //* DEBUG: */ echo basename(__FILE__).":uid={$uid},points={$points},opoints={$opoints}
\n"; $content = array( 'sw' => $SW , 'uid' => $uid, diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 3ef6deee46..57572a1570 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1070,16 +1070,16 @@ 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, $add="") { $ret = 0; if ($onlyRows) { // Count rows - $result = SQL_QUERY_ESC("SELECT COUNT(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'", - array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT COUNT(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'%s", + array($lookFor, $tableName, $whereStatement, $search, $add), __FILE__, __LINE__); } else { // Add all rows - $result = SQL_QUERY_ESC("SELECT SUM(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'", - array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT SUM(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'%s", + array($lookFor, $tableName, $whereStatement, $search, $add), __FILE__, __LINE__); } // Load row