A little better SQL, but still does not calculate correctly
authorRoland Häder <roland@mxchange.org>
Wed, 24 Oct 2012 23:27:42 +0000 (23:27 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 24 Oct 2012 23:27:42 +0000 (23:27 +0000)
inc/modules/admin/what-list_user_amounts.php

index de0fdfd..7652382 100644 (file)
@@ -55,7 +55,7 @@ $sql = substr($sql, 0, -1);
 
 // 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`
@@ -67,9 +67,9 @@ INNER JOIN
 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)) {