From: Roland Häder Date: Sat, 20 Mar 2010 23:34:58 +0000 (+0000) Subject: SQL fixes for wrong column names. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2eddf3cc2e62cb02d4c9e6c01d9bcfb970d67476;p=mailer.git SQL fixes for wrong column names. --- diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index 9126d81632..79fbe434eb 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -98,7 +98,7 @@ FROM WHERE `timestamp_send` <= (UNIX_TIMESTAMP() - {?ap_dm_timeout?}) ORDER BY - `sender` ASC", __FILE__, __LINE__); + `userid` ASC", __FILE__, __LINE__); // Do we have "purged" mails? if (SQL_NUMROWS($result_mails) > 0) { @@ -107,21 +107,21 @@ if (SQL_NUMROWS($result_mails) > 0) { // Check now... if (!fetchUserData($content['sender'])) { // Okay we found some mails! - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `sender`=%s", - array(bigintval($content['sender'])), __FILE__, __LINE__); + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid`=%s", + array(bigintval($content['userid'])), __FILE__, __LINE__); // Get all affected (deleted) rows $deletedStats += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... $result_mails = SQL_QUERY("SELECT - `userid` AS sender + `userid` AS userid FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `timestamp_send` <= (UNIX_TIMESTAMP() - {?ap_dm_timeout?}) ORDER BY - `sender` ASC", __FILE__, __LINE__); + `userid` ASC", __FILE__, __LINE__); } // END - if } // END - while } // END - if