setConfigEntry($entry, $values[$idx]);
} else {
// String detected
- $SQL .= sprintf("`%s`='%s',", $entry, SQL_ESCAPE($values[$idx]));
+ $SQL .= sprintf("`%s`='%s',", $entry, sqlEscapeString($values[$idx]));
// Set it in config as well
setConfigEntry($entry, $values[$idx]);
setConfigEntry($entries, time());
} else {
// Regular entry to update
- $SQL = sprintf("`%s`='%s'", $entries, SQL_ESCAPE($values));
+ $SQL = sprintf("`%s`='%s'", $entries, sqlEscapeString($values));
// Set it in config as well
- setConfigEntry($entries, SQL_ESCAPE($values));
+ setConfigEntry($entries, sqlEscapeString($values));
}
// Run database update
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQL=' . $SQL);
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$SQL." WHERE `config`=%s LIMIT 1",
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$SQL." WHERE `config`=%s LIMIT 1",
array(bigintval($config)), __FUNCTION__, __LINE__);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQL=' . $SQL . ',affectedRows=' . SQL_AFFECTEDROWS());
// Load config from cache
mergeConfig($GLOBALS['cache_array']['config'][$no]);
- // Count cache hits
+ // Count cache hits
incrementStatsEntry('cache_hits');
} elseif ((!isExtensionActive('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) {
// Load config from DB
- $result_config = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_config` WHERE `config`='%s' LIMIT 1",
+ $result_config = sqlQueryEscaped("SELECT * FROM `{?_MYSQL_PREFIX?}_config` WHERE `config`='%s' LIMIT 1",
array(bigintval($no)), __FUNCTION__, __LINE__);
// Is the config there?
- if (SQL_NUMROWS($result_config) == 1) {
+ if (sqlNumRows($result_config) == 1) {
// Get config from database
- mergeConfig(SQL_FETCHARRAY($result_config));
+ mergeConfig(sqlFetchArray($result_config));
} // END - if
// Free result
- SQL_FREERESULT($result_config);
+ sqlFreeResult($result_config);
// Remember this config in the array
$GLOBALS['cache_array']['config'][$no] = getConfigArray();