From: Roland Häder Date: Fri, 19 Dec 2008 16:44:35 +0000 (+0000) Subject: Debug line added and inserting of ref-level 0 fixed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=53044feaa7d4a19c7793f6310586a81100435a1c;p=mailer.git Debug line added and inserting of ref-level 0 fixed --- diff --git a/inc/databases.php b/inc/databases.php index 037173e9be..c370b10689 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -115,7 +115,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "664"); +define('CURR_SVN_REVISION', "665"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 38ddd85c08..21e7f49846 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1144,7 +1144,7 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid // Check user account $result_user = SQL_QUERY_ESC("SELECT refid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1", - array(bigintval($uid)), __FILE__, __LINE__); + array(bigintval($uid)), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},numRows=".SQL_NUMROWS($result_user).",points={$points}
\n"; if (SQL_NUMROWS($result_user) == 1) { @@ -1171,14 +1171,15 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid // Update points... SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET %s=%s+%s WHERE userid=%s AND ref_depth='%s' LIMIT 1", - array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FILE__, __LINE__); + array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FILE__, __LINE__); //* DEBUG: */ print __FUNCTION__."(".__LINE__."):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")
\n"; // No entry updated? if (SQL_AFFECTEDROWS() < 1) { // First ref in this level! :-) $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid,ref_depth,%s) VALUES (%s,%s,%s)", - array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FILE__, __LINE__); + array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FILE__, __LINE__); + //* DEBUG: */ print __FUNCTION__."(".__LINE__."):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")
\n"; } // END - if // Update mediadata as well