- while (list($dep, $locked) = SQL_FETCHROW($result_points))
- {
- //* DEBUG: */ echo basename(__FILE__).":uid={$uid},depth={$dep},locked={$locked}<br />\n";
- $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s, locked_points=0.00000
-WHERE userid=%s AND ref_depth=%d LIMIT 1",
- array($locked, bigintval($uid), $dep), __FILE__, __LINE__);
+ while ($content2 = SQL_FETCHARRAY($result_points)) {
+ // Merge both arrays
+ $content = merge_array($content, $content2);
+
+ //* DEBUG: */ outputHtml(basename(__FILE__).":userid={$content['userid']},depth={$content['ref_depth']},locked={$content['locked_points']}<br />");
+ addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+%s, `locked_points`=0.00000
+WHERE `userid`=%s AND `ref_depth`=%d
+LIMIT 1",
+ array($content['locked_points'], bigintval($content['userid']), $content['ref_depth']), __FILE__, __LINE__, false));