// Is forced type not NULL?
if (!is_null($forcedType)) {
// Then set proper WHERE
- $where = sprintf("WHERE `forced_ads_type`='%s'", SQL_ESCAPE($forcedType));
+ $where = sprintf("WHERE `forced_ads_type`='%s'", sqlEscapeString($forcedType));
} // END - if
// Search all given types
- $result = SQL_QUERY('SELECT
+ $result = sqlQuery('SELECT
`forced_ads_id`,
`forced_ads_ad_url`,
`forced_ads_click_url`,
`forced_ads_id` ASC', __FUNCTION__, __LINE__);
// Is there at least one entry?
- if (!SQL_HASZERONUMS($result)) {
+ if (!ifSqlHasZeroNums($result)) {
// Get all elements
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Add it
$forcedAds[$content['forced_ads_id']] = $content;
} // END - while
} // END - if
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Return it
return $forcedAds;
// Is visibility not NULL?
if (!is_null($visibility)) {
// Then add WHERE statement
- $where = sprintf(" WHERE `forced_costs_visibility`='%s'", SQL_ESCAPE($visibility));
+ $where = sprintf(" WHERE `forced_costs_visibility`='%s'", sqlEscapeString($visibility));
} // END - if
// Search all given types
- $result = SQL_QUERY("SELECT
+ $result = sqlQuery("SELECT
`forced_costs_id`,
`forced_costs_price_click`,
`forced_costs_payment_click`,
`forced_costs_id` ASC", __FUNCTION__, __LINE__);
// Is there at least one entry?
- if (!SQL_HASZERONUMS($result)) {
+ if (!ifSqlHasZeroNums($result)) {
// Get all elements
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Add it
$forcedCosts[$content['forced_costs_id']] = $content;
} // END - while
} // END - if
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Return it
return $forcedCosts;
$forcedCampaigns = array();
// Search all given types
- $result = SQL_QUERY_ESC("SELECT
+ $result = sqlQueryEscaped("SELECT
`forced_campaign_id`,
UNIX_TIMESTAMP(`forced_campaign_created`) AS `forced_campaign_created`,
`forced_campaign_status`,
), __FUNCTION__, __LINE__);
// Is there at least one entry?
- if (!SQL_HASZERONUMS($result)) {
+ if (!ifSqlHasZeroNums($result)) {
// Get all elements
- while ($content = SQL_FETCHARRAY($result)) {
+ while ($content = sqlFetchArray($result)) {
// Add it
$forcedCampaigns[$content['forced_campaign_id']] = $content;
} // END - while
} // END - if
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
// Return it
return $forcedCampaigns;
// Update the status now
// ---------- Comment out for debugging/developing member actions! ---------
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_forced_campaigns` SET `forced_campaign_status`='%s' WHERE `forced_campaign_id`=%s LIMIT 1",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_forced_campaigns` SET `forced_campaign_status`='%s' WHERE `forced_campaign_id`=%s LIMIT 1",
array(
$newStatus,
bigintval($campaignId)
// Was that fine?
// ---------- Comment out for debugging/developing member actions! ---------
- if (SQL_AFFECTEDROWS() != 1) {
+ if (sqlAffectedRows() != 1) {
// No, something went wrong
return FALSE;
} // END - if