]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
A lot while() conditions rewritten to SQL_FETCHARRAY(), see bug #107, @TODO tags...
[mailer.git] / inc / db / lib-mysql3.php
index 88a135789b280c4e573327eebd2eb26aa71c5428..205342517638c65414b1bd5e4f7b90bcae069eb0 100644 (file)
@@ -48,6 +48,9 @@ function SQL_QUERY ($sql_string, $F, $L) {
        // 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()));
 
@@ -203,12 +206,12 @@ function SQL_CLOSE ($F, $L) {
 
        // 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
@@ -240,7 +243,7 @@ function SQL_QUERY_ESC ($qstring, $data, $F, $L, $run=true, $strip=true) {
        // Init variable
        $query = "failed";
 
-       if ($strip) {
+       if ($strip === true) {
                $strip = "true";
        } else {
                $strip = "false";