// Replace {!_MYSQL_PREFIX!} with constant, closes #84. Thanks to profi-concept
$sql_string = str_replace("{!_MYSQL_PREFIX!}", constant('_MYSQL_PREFIX'), $sql_string);
+ // Replace {!_TABLE_TYPE!} with constant
+ $sql_string = str_replace("{!_TABLE_TYPE!}", constant('_TABLE_TYPE'), $sql_string);
+
// Starting time
$querytimeBefore = array_sum(explode(' ', microtime()));
// Do we need to update cache/db counter?
//* DEBUG: */ echo "DB=".getConfig('db_hits').",CACHE=".getConfig('cache_hits')."<br />\n";
- if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (is_object($GLOBALS['cache_instance']))) {
+ if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) {
// Add new hits
incrementConfigEntry('db_hits', getConfig('db_hits_run'));
// Update counter for db/cache
- UPDATE_CONFIG(array("db_hits", "cache_hits"), array(bigintval(getConfig('db_hits')), bigintval(getConfig('cache_hits'))));
+ UPDATE_CONFIG(array("db_hits", "cache_hits"), array(getConfig(('db_hits')), getConfig(('cache_hits'))));
} // END - if
// Close database link and forget the link
// Init variable
$query = "failed";
- if ($strip) {
+ if ($strip === true) {
$strip = "true";
} else {
$strip = "false";