]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
handling of boolean constants improved (not fully)
[mailer.git] / inc / db / lib-mysql3.php
index c0af2231674b1de36ea5a237807fb760a5ff26d9..0c2b15b17f24bf7e8715cdf2449928196ea0820a 100644 (file)
@@ -43,6 +43,9 @@ function SQL_QUERY($sql_string, $F, $L)
 {
        global $link, $CSS, $_CONFIG, $OK;
 
+       // Remove \t, \n and \r from queries they may confuse some MySQL version I have heard
+       $sql_string = str_replace("\t", " ", str_replace("\n", " ", str_replace("\r", " ", $sql_string)));
+
        // Run SQL command
        $result = @mysql_query($sql_string, $link)
         or ADD_FATAL($F." (".$L."):".mysql_error()."<br />
@@ -54,7 +57,7 @@ function SQL_QUERY($sql_string, $F, $L)
         $_CONFIG['sql_count']++;
 
         // Debug output
-        //* DEBUG: */ print "Query=<em>".$sql_string."</em>, affected=<b>".SQL_AFFECTEDROWS()."</b>, numrows=<b>".SQL_NUMROWS($result)."</b><br />\n";
+        //* DEBUG: */ print "Query=<pre>".$sql_string."</pre>, affected=<b>".SQL_AFFECTEDROWS()."</b>, numrows=<b>".SQL_NUMROWS($result)."</b><br />\n";
 
        if (($CSS != "1") && ($CSS != "-1") && (DEBUG_MODE) && (DEBUG_SQL))
        {