} // END - if
// Run query
- $result_main = SQL_QUERY("SELECT
+ $result_main = sqlQuery("SELECT
`id`,
`subject`,
`text`,
`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
//* 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',
} // END - if
} elseif ($GLOBALS['pool_cnt'] >= getMaxSend()) {
// Update bonus pool
- SQL_QUERY_ESC("UPDATE
+ sqlQueryEscaped("UPDATE
`{?_MYSQL_PREFIX?}_bonus`
SET
`data_type`='NEW',
} // END - if
// Free memory
- SQL_FREERESULT($result_main);
+ sqlFreeResult($result_main);
// Remove variable
unset($mailText);