Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / member / what-list_coupon.php
index f28da984d32fcc0ef356b814290cbb700d8c2d88..e4ec9a406404f433d4dfef1ac4d776817f773f85 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -52,7 +52,7 @@ if ((!isExtensionActive('coupon')) && (!isAdmin())) {
 } // END - if
 
 // Check if the user has cashed coupons
-$result = SQL_QUERY_ESC("SELECT
+$result = sqlQueryEscaped("SELECT
        UNIX_TIMESTAMP(`u`.`cashed_on`) AS `cashed_on`,
        UNIX_TIMESTAMP(`d`.`coupon_created`) AS `coupon_created`,
        UNIX_TIMESTAMP(`d`.`coupon_expired`) AS `coupon_expired`,
@@ -74,12 +74,12 @@ ORDER BY
        `u`.`cashed_on` DESC", array(getMemberId()), __FILE__, __LINE__);
 
 // Are there entries?
-if (!SQL_HASZERONUMS($result)) {
+if (!ifSqlHasZeroNumRows($result)) {
        // Init variable
        $OUT = '';
 
        // Load all rows
-       while ($content = SQL_FETCHARRAY($result)) {
+       while ($content = sqlFetchArray($result)) {
                // Translate all timestamps
                $content['cashed_on']      = generateDateTime($content['cashed_on']     , '2');
                $content['coupon_created'] = generateDateTime($content['coupon_created'], '2');
@@ -97,7 +97,7 @@ if (!SQL_HASZERONUMS($result)) {
 }
 
 // Free result
-SQL_FREERESULT($result);
+sqlFreeResult($result);
 
 // [EOF]
 ?>