]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
'order_points' and locked are now displayed, some array elements/language ids renamed
[mailer.git] / inc / db / lib-mysql3.php
index f8c429e42655bda9889c5415c8682d1de2abec4f..6a11f697f10bdbd08f0b8cc81bf3be3c357240df 100644 (file)
@@ -119,7 +119,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) {
                } // END - if
 
                // Append debug line
-               appendLineToFile(getCachePath() . 'mysql.log', $F . '(LINE=' . $L . '|NUM=' . SQL_NUMROWS($result) . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . $queryTime . '): ' . str_replace("\r", '', str_replace("\n", ' ', $GLOBALS['last_sql'])));
+               appendLineToFile(getCachePath() . 'mysql.log', basename($F) . '|LINE=' . $L . '|NUM=' . (is_resource($result) ? SQL_NUMROWS($result) : 'false') . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . $queryTime . '): ' . str_replace("\r", '', str_replace("\n", ' ', $GLOBALS['last_sql'])));
        } // END - if
 
        // Count DB hits
@@ -547,6 +547,11 @@ function SQL_PREPARE_SQL_STRING ($sqlString, $enableCodes = true) {
        return $GLOBALS['sql_strings'][$sqlString];
 }
 
+// Creates a MySQL TIMESTAMP compatible string from given Uni* timestamp
+function SQL_EPOCHE_TO_TIMESTAMP ($timestamp) {
+       return generateDateTime($timestamp, 7);
+}
+
 // Check if there is a SQL table created
 function isSqlTableCreated ($tableName) {
        // Do we have cache?