From: quix0r 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/?a=commitdiff_plain;h=c86c4788d2d6f21107f5390c7bcb39f801b4a2d9;p=mailer.git 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)) {