Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / admin / what-list_email_max_rec.php
index 560fad0b6299b363ec344bff1f5c0e8e5ca9bbb5..676ce93bba8c249ca5c768395d6ee670172f852d 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 (isPostRequestElementSet('add_max')) {
        // Save all settings
        $result = sqlQueryEscaped("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1",
        array(bigintval(postRequestElement('max'))), __FILE__, __LINE__);
-       if (ifSqlHasZeroNums($result)) {
+       if (ifSqlHasZeroNumRows($result)) {
                // Add this value (including comment)
                sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES ('%s','%s')",
                array(bigintval(postRequestElement('max')), postRequestElement('comment')),__FILE__, __LINE__);
@@ -134,7 +134,7 @@ if (isPostRequestElementSet('add_max')) {
 } else {
        $result = sqlQuery("SELECT `id`, `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY `value` ASC",
        __FILE__, __LINE__);
-       if (!ifSqlHasZeroNums($result)) {
+       if (!ifSqlHasZeroNumRows($result)) {
                // List already existing entries for editing
                $OUT = '';
                while ($content = sqlFetchArray($result)) {