]> git.mxchange.org Git - mailer.git/blobdiff - inc/autopurge/purge-general.php
Some SQLs rewritten, unneccessary parameter removed
[mailer.git] / inc / autopurge / purge-general.php
index 3702659edb70d740baf284f85d1058d44c5457ba..9bb2ceae2b0082b18ce9ea8b592e3890002b6e14 100644 (file)
@@ -113,7 +113,7 @@ ORDER BY
        // Is the 'bonus' extension installed and activated?
        if (isExtensionActive('bonus', true)) {
                // Check for bonus campaigns
-               $result = SQL_QUERY_ESC("SELECT `id`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='SEND' AND timestamp <= %s ORDER BY `id`",
+               $result = SQL_QUERY_ESC("SELECT `id`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='SEND' AND `timestamp` <= %s ORDER BY `id` ASC",
                        array(bigintval($PURGE)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        // Start deleting procedure
@@ -153,7 +153,7 @@ ORDER BY
        // Add points from deleted accounts to jackpot, but here just add to notify mail
        if ($admin_points > 0) {
                // Send mail to admin
-               sendAdminNotification(getMessage('AUTOPURGE_ADMIN_SUBJECT'), 'admin_autopurge_points', translateComma($admin_points), 0);
+               sendAdminNotification(getMessage('AUTOPURGE_ADMIN_SUBJECT'), 'admin_autopurge_points', translateComma($admin_points));
        } // END - if
 
        // Run all SQLs here