Mailer project continued (heavy refactoring):
[mailer.git] / inc / db / lib-mysql3.php
index 8715bc7b4a796de68afc2fa102a5526dc515936c..4b8c5a299a01bfed117e976008b6c8623256d8c1 100644 (file)
@@ -66,7 +66,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = TRUE) {
                }
 
                // Remove \t, \n and \r from queries they may confuse some MySQL versions
-               $sqlStringModified = str_replace(array(chr(9), chr(10), chr(13)), array(' ', ' ', ' '), $sqlStringModified);
+               $sqlStringModified = str_replace(array(chr(9), PHP_EOL, chr(13)), array(' ', ' ', ' '), $sqlStringModified);
 
                // Compile config entries out
                $sqlStringModified = SQL_PREPARE_SQL_STRING($sqlStringModified, $enableCodes);
@@ -118,7 +118,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = TRUE) {
                } // END - if
 
                // Append debug line
-               appendLineToFile(getCachePath() . 'mysql.log', basename($F) . '|LINE=' . $L . '|NUM=' . (is_resource($result) ? SQL_NUMROWS($result) : 'false') . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . ($queryTime * 1000) . 'ms): ' . str_replace(array(chr(13), chr(10)), array('', ' '), $GLOBALS['last_sql']));
+               appendLineToFile(getCachePath() . 'mysql.log', basename($F) . '|LINE=' . $L . '|NUM=' . (is_resource($result) ? SQL_NUMROWS($result) : 'false') . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . ($queryTime * 1000) . 'ms): ' . str_replace(array(chr(13), PHP_EOL), array('', ' '), $GLOBALS['last_sql']));
        } // END - if
 
        // Increment stats entry