// Run the query to obtain all user's amounts (regardless of their status)
$result = SQL_QUERY('SELECT
- d.`userid`,
+ p.`userid`,
SUM(
' . $sql . ' -
d.`used_points`
ON
d.`userid`=p.`userid`
GROUP BY
- d.`userid`
+ p.`userid`
ORDER BY
- d.`userid` ASC', __FILE__, __LINE__);
+ p.`userid` ASC', __FILE__, __LINE__);
// Are there entries? (sorry, the XML functions cannot "produce" the above SQL statement)
if (!SQL_HASZERONUMS($result)) {