]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/bonus_functions.php
More queries now depends on UNIX_TIMESTAMP() SQL function, wrong index in autopurge...
[mailer.git] / inc / libs / bonus_functions.php
index bde8c4836cbe6b34bc44f6e66a13ee00ff5cbe46..14041197537088410364f5bdf19f86569af48595 100644 (file)
@@ -239,7 +239,7 @@ function BONUS_PURGE_EXPIRED_TURBO_BONUS()
 {
        global $_CONFIG;
        // Remove entries
-       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < ".(time() - $_CONFIG['bonus_timeout']), __FILE__, __LINE__);
+       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < (UNIX_TIMESTAMP() - ".$_CONFIG['bonus_timeout'].")", __FILE__, __LINE__);
        if (SQL_AFFECTEDROWS() > 0) {
                // Send out email to admin
                SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_TURBO_SUBJECT, "admin_autopurge_turbo", $DELETED, "");