]> git.mxchange.org Git - mailer.git/blobdiff - inc/purge/purge-coupon.php
Typo fixed.
[mailer.git] / inc / purge / purge-coupon.php
index d513875d8f654d51909ffb47e856116d235f1ec6..3af67078a73b3087cd923e7eb4b07122c9319757 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Search for all expired coupons that we can purge
-$result = SQL_QUERY('SELECT
+$result = sqlQuery('SELECT
        `id`,
        UNIX_TIMESTAMP(`coupon_created`) AS `coupon_created`,
        UNIX_TIMESTAMP(`coupon_expired`) AS `coupon_expired`,
@@ -60,13 +60,13 @@ ORDER BY
        `id` ASC', __FILE__, __LINE__);
 
 // Are there entries?
-if (SQL_NUMROWS($result) > 0) {
+if (sqlNumRows($result) > 0) {
        // Init variables
        $out = '';
        $ids = array();
 
        // Start purging all
-       while ($content = SQL_FETCHARRAY($result)) {
+       while ($content = sqlFetchArray($result)) {
                // Add id
                array_push($ids, $content['id']);
 
@@ -79,10 +79,10 @@ if (SQL_NUMROWS($result) > 0) {
        } // END - while
 
        // Purge all entries
-       SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_coupon_data` WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`coupon_expired`)) >= {?coupon_autopurge_time?}', __FILE__, __LINE__);
+       sqlQuery('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_coupon_data` WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`coupon_expired`)) >= {?coupon_autopurge_time?}', __FILE__, __LINE__);
 
        // Purge also user entries
-       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_coupons` WHERE `coupon_id` IN (%s) LIMIT %s",
+       sqlQueryEscaped("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_coupons` WHERE `coupon_id` IN (%s) LIMIT %s",
                array(
                        implode(',', $ids),
                        count($ids)
@@ -93,7 +93,7 @@ if (SQL_NUMROWS($result) > 0) {
 } // END - if
 
 // Free result
-SQL_FREERESULT($result);
+sqlFreeResult($result);
 
 // [EOF]
 ?>