]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
Mailer project continued:
[mailer.git] / inc / db / lib-mysql3.php
index 2f1c1b4fe1bfa93295d677caf688c1d40e7553ab..1da0f27c5a2befb19ff39dbd25d57bdc75fd0f66 100644 (file)
@@ -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 . '): ' . 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), chr(10)), array('', ' '), $GLOBALS['last_sql']));
        } // END - if
 
        // Increment stats entry
@@ -177,12 +177,12 @@ function SQL_FETCHROW ($resource) {
 }
 
 // SQL fetch array
-function SQL_FETCHARRAY ($res) {
+function SQL_FETCHARRAY ($resource) {
        // Is a result resource set?
-       if ((!is_resource($res)) || (!SQL_IS_LINK_UP())) return false;
+       if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) return false;
 
        // Load row from database
-       $row = mysql_fetch_assoc($res);
+       $row = mysql_fetch_assoc($resource);
 
        // Return only arrays here
        if (is_array($row)) {
@@ -306,7 +306,7 @@ function SQL_INSERTID () {
 // Escape a string for the database
 function SQL_ESCAPE ($str, $secureString = true, $strip = true) {
        // Do we have cache?
-       if (!isset($GLOBALS['sql_escapes'][''.$str.''])) {
+       if (!isset($GLOBALS['sql_escapes']['' . $str . ''])) {
                // Prepare the string here
                $str = SQL_PREPARE_SQL_STRING($str);
 
@@ -331,11 +331,11 @@ function SQL_ESCAPE ($str, $secureString = true, $strip = true) {
                }
 
                // Cache result
-               $GLOBALS['sql_escapes'][''.$str.''] = $ret;
+               $GLOBALS['sql_escapes']['' . $str . ''] = $ret;
        } // END - if
 
        // Return it
-       return $GLOBALS['sql_escapes'][''.$str.''];
+       return $GLOBALS['sql_escapes']['' . $str . ''];
 }
 
 // SELECT query string from table, columns and so on... ;-)