From: Roland Häder Date: Wed, 24 Oct 2012 23:27:42 +0000 (+0000) Subject: A little better SQL, but still does not calculate correctly X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=928e9aedd8248545a9fef27c75a5ba016ad1d61b A little better SQL, but still does not calculate correctly --- diff --git a/inc/modules/admin/what-list_user_amounts.php b/inc/modules/admin/what-list_user_amounts.php index de0fdfd446..76523825fc 100644 --- a/inc/modules/admin/what-list_user_amounts.php +++ b/inc/modules/admin/what-list_user_amounts.php @@ -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)) {