`timestamp` DESC";
// Check for maximum pages
-$result_maximum = SQL_QUERY($sql, __FILE__, __LINE__);
+$result_maximum = sqlQuery($sql, __FILE__, __LINE__);
// Set offset an current page to default values
if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1);
$sql .= ' LIMIT ' . (getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')) . ', ' . getRequestElement('offset');
// Run SQL query for normal mails
-$result = SQL_QUERY($sql, __FILE__, __LINE__);
+$result = sqlQuery($sql, __FILE__, __LINE__);
// Calculate pages
-$numPages = round(SQL_NUMROWS($result_maximum) / getMailsPage() + 0.5);
+$numPages = round(sqlNumRows($result_maximum) / getMailsPage() + 0.5);
// Free the result which we don't need
-SQL_FREERESULT($result_maximum);
+sqlFreeResult($result_maximum);
-if (!SQL_HASZERONUMS($result)) {
+if (!ifSqlHasZeroNums($result)) {
// Mail orders are in pool so we can display them
// Add navigation table rows
// List all entries
$OUT = '';
- while ($pool = SQL_FETCHARRAY($result)) {
+ while ($pool = sqlFetchArray($result)) {
// Check sent mails and clicks
- $result_mails = SQL_QUERY_ESC("SELECT `max_rec`, `clicks` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
+ $result_mails = sqlQueryEscaped("SELECT `max_rec`, `clicks` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
array(bigintval($pool['id'])), __FILE__, __LINE__);
// Load entries
- $pool = merge_array($pool, SQL_FETCHARRAY($result_mails));
+ $pool = merge_array($pool, sqlFetchArray($result_mails));
// Merge result
- SQL_FREERESULT($result_mails);
+ sqlFreeResult($result_mails);
// Unconfirmed mails
$pool['unconfirmed'] = generateUnconfirmedAdminLink($pool['id'], ($pool['max_rec'] - $pool['clicks']), 'normal');
}
// Free memory
-SQL_FREERESULT($result);
+sqlFreeResult($result);
// [EOF]
?>