X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fdb%2Flib-mysql3.php;h=d2d13ba4530eb4dc92544699149b3ee06ead3ead;hb=168004e78b90321c9e8b0f1d9b591fb8159a9c96;hp=aada78066645053339dc73754f1b19191a7cbb5e;hpb=f80c8bcb6e503a761c07731b4741d718edb844c6;p=mailer.git diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index aada780666..d2d13ba453 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -14,8 +14,6 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009, 2010 by Mailer Developer Team * @@ -101,7 +99,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { incrementConfigEntry('sql_count'); // Debug output - if ((getScriptOutputMode() != 1) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) { + if ((!isCssOutputMode()) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) { // // Debugging stuff... // @@ -137,9 +135,15 @@ function SQL_NUMROWS ($resource) { $lines = false; // Is the result a valid resource? - if (is_resource($resource)) { + if (isset($GLOBALS['sql_numrows'][$resource])) { + // Use cache + $lines = $GLOBALS['sql_numrows'][intval($resource)]; + } elseif (is_resource($resource)) { // Get the count of rows from database $lines = mysql_num_rows($resource); + + // Remember it in cache + $GLOBALS['sql_numrows'][intval($resource)] = $lines; } else { // No resource given, please fix this debug_report_bug(__FUNCTION__, __LINE__, 'No resource given! result[]=' . gettype($resource) . ',last_sql=' . $GLOBALS['last_sql']); @@ -171,7 +175,7 @@ function SQL_FETCHROW ($resource) { } // SQL fetch array -function SQL_FETCHARRAY ($res, $nr=0) { +function SQL_FETCHARRAY ($res) { // Is a result resource set? if ((!is_resource($res)) || (!SQL_IS_LINK_UP())) return false;