]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool/pool-bonus.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / pool / pool-bonus.php
index bc026e9c0df9a4586a119ea240ba1c77c221bfb2..57c1e3ed709fdf641fc3a3b768a062ca5676da99 100644 (file)
@@ -61,7 +61,7 @@ if ($GLOBALS['pool_cnt'] < getMaxSend()) {
        } // END - if
 
        // Run query
-       $result_main = SQL_QUERY("SELECT
+       $result_main = sqlQuery("SELECT
        `id`,
        `subject`,
        `text`,
@@ -82,15 +82,15 @@ ORDER BY
        `timestamp` DESC", __FILE__, __LINE__);
 
        // Some mails left?
-       if (!SQL_HASZERONUMS($result_main)) {
+       if (!ifSqlHasZeroNums($result_main)) {
                // Init SQLs here
                initSqls();
 
                // Send these mails away...
                $count2 = '';
-               while ($mailData = SQL_FETCHARRAY($result_main)) {
+               while ($mailData = sqlFetchArray($result_main)) {
                        // Message is active in queue
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='QUEUE' WHERE `id`=%s LIMIT 1",
+                       sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='QUEUE' WHERE `id`=%s LIMIT 1",
                                array(bigintval($mailData['id'])), __FILE__, __LINE__);
 
                        // Default is no users left
@@ -175,7 +175,7 @@ ORDER BY
                        //* DEBUG: */ debugOutput('-L:'.__LINE__.'/'.countSelection($temporaryReceivers).'-');
                        if (countSelection($temporaryReceivers) == 0) {
                                // Queue reached!
-                               SQL_QUERY_ESC("UPDATE
+                               sqlQueryEscaped("UPDATE
        `{?_MYSQL_PREFIX?}_bonus`
 SET
        `data_type`='SEND',
@@ -195,7 +195,7 @@ LIMIT 1",
                                } // END - if
                        } elseif ($GLOBALS['pool_cnt'] >= getMaxSend()) {
                                // Update bonus pool
-                               SQL_QUERY_ESC("UPDATE
+                               sqlQueryEscaped("UPDATE
        `{?_MYSQL_PREFIX?}_bonus`
 SET
        `data_type`='NEW',
@@ -219,7 +219,7 @@ LIMIT 1",
        } // END - if
 
        // Free memory
-       SQL_FREERESULT($result_main);
+       sqlFreeResult($result_main);
 
        // Remove variable
        unset($mailText);