- while (list($uid) = SQL_FETCHROW($result_daily))
- {
- //* DEBUG: */ echo basename(__FILE__).":uid={$uid}<br />\n";
- $result_points = SQL_QUERY_ESC("SELECT ref_depth, locked_points FROM "._MYSQL_PREFIX."_user_points
-WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth",
- array(bigintval($uid)), __FILE__, __LINE__);
- //* DEBUG: */ echo basename(__FILE__).":payout=0;points|numRows=".SQL_NUMROWS($result_points)."<br />\n";
- if (SQL_NUMROWS($result_points) > 0)
- {
+ while ($content = SQL_FETCHARRAY($result_daily)) {
+ //* DEBUG: */ debugOutput(basename(__FILE__) . ':' . $content['userid']);
+ $result_points = SQL_QUERY_ESC("SELECT
+ `ref_depth`,
+ `locked_points`
+FROM
+ `{?_MYSQL_PREFIX?}_user_points`
+WHERE
+ `userid`=%s AND
+ `locked_points` != 0.00000
+ORDER BY
+ `ref_depth` ASC",
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
+
+ //* DEBUG: */ debugOutput(basename(__FILE__) . ':payout=0;points|numRows=' . SQL_NUMROWS($result_points));
+ if (SQL_NUMROWS($result_points) > 0) {