]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
query masking rewritten in more SQLs, several cleanups and fix on beg link
[mailer.git] / inc / db / lib-mysql3.php
index 5d2cfd9cff4af3844c1da9e6dfd6eea876abc2c5..fc424e00289fab1c11706bc797793a26b238a0da 100644 (file)
@@ -49,6 +49,9 @@ function SQL_QUERY($sql_string, $F, $L, $compile=false)
 ".MYSQL_QUERY_STRING."<BR>
 ".$sql_string);
 
+        // Debug output
+        print "Query=<em>".$sql_string."</em>, affected=<b>".SQL_AFFECTEDROWS()."</b>, numrows=<b>".SQL_NUMROWS($result)."</b><br />\n";
+
        if (($CSS != "1") && ($CSS != "-1") && (DEBUG_MODE) && (DEBUG_SQL))
        {
                //
@@ -174,7 +177,8 @@ function SQL_CLOSE($link, $F, $L)
        if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($CONFIG['db_hits'])) && (isset($CONFIG['cache_hits'])) && (is_object($CACHE)))
        {
                // Update counter for db/cache
-               $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET db_hits='".$CONFIG['db_hits']."', cache_hits='".$CONFIG['cache_hits']."' WHERE config='0' LIMIT 1", __FILE__, __LINE__);
+               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET db_hits=%d, cache_hits=%d WHERE config='0' LIMIT 1",
+                       array(bigintval($CONFIG['db_hits']), bigintval($CONFIG['cache_hits'])), __FILE__, __LINE__);
 
                // Update cache here
                if (GET_EXT_VERSION("cache") >= "0.1.2")