]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_user_amounts.php
Project continued:
[mailer.git] / inc / modules / admin / what-list_user_amounts.php
index de0fdfd4464d857ae5017f07fdd864eb2a4271f2..76523825fcd3b637f400f6634316544a9959c6c9 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)) {