Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / member / what-bonus.php
index f8de551a61d04741b31e727f5e6c6ddcb281675f..bfc486f5bc438e13b750deba84663fc1363e0ea0 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 *
@@ -68,7 +68,7 @@ if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
 } // END - if
 
 // Let's check if there are some points left we can 'pay'...
-$result = SQL_QUERY_ESC("SELECT
+$result = sqlQueryEscaped("SELECT
        `userid`,
        ".$pointsColumns." AS `points`,
        `last_online`
@@ -90,10 +90,10 @@ LIMIT {?bonus_ranks?}",
 
 // Reset temporary variable and check for users
 $OUT = '';
-if (!SQL_HASZERONUMS($result)) {
+if (!ifSqlHasZeroNumRows($result)) {
        // Load our winners...
        $count = 1;
-       while ($content = SQL_FETCHARRAY($result)) {
+       while ($content = sqlFetchArray($result)) {
                // Prepare data for the template
                $content['count']       = $count;
                $content['last_online'] = generateDateTime($content['last_online'], '2');
@@ -110,7 +110,7 @@ if (!SQL_HASZERONUMS($result)) {
 }
 
 // Free memory
-SQL_FREERESULT($result);
+sqlFreeResult($result);
 
 // Prepare content array
 $content['rows'] = $OUT;