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) {
// 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