// Is the 'bonus' extension installed and activated?
if (isExtensionActive('bonus', TRUE)) {
// Check for bonus campaigns
// Is the 'bonus' extension installed and activated?
if (isExtensionActive('bonus', TRUE)) {
// Check for bonus campaigns
- $result = SQL_QUERY("SELECT `id`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='SEND' AND `timestamp` <= {?auto_purge?} ORDER BY `id` ASC", __FILE__, __LINE__);
- if (!SQL_HASZERONUMS($result)) {
+ $result = sqlQuery("SELECT `id`, `points` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `data_type`='SEND' AND `timestamp` <= {?auto_purge?} ORDER BY `id` ASC", __FILE__, __LINE__);
+ if (!ifSqlHasZeroNums($result)) {
// Start deleting procedure
$points = '0';
// Start deleting procedure
$points = '0';
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Check if confirmation links are purged or not
// Check if confirmation links are purged or not
- $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
+ $result_links = sqlQueryEscaped("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",