]> git.mxchange.org Git - mailer.git/commitdiff
A little better SQL, but still does not calculate correctly
authorquix0r <quix0r@mxchange.org>
Wed, 24 Oct 2012 23:27:42 +0000 (23:27 +0000)
committerquix0r <quix0r@mxchange.org>
Wed, 24 Oct 2012 23:27:42 +0000 (23:27 +0000)
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)) {