From 47d22181ebf8323b22719d85b15f42da9f400ef5 Mon Sep 17 00:00:00 2001 From: streaky Date: Thu, 5 Apr 2007 01:54:17 +0000 Subject: [PATCH] Fixed a bad performance issue which involved a query that instead of getting a row count was getting an entire result set (a large percentage of the size of the forum_t table). --- top.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/top.php b/top.php index 31f66910e..343ca6b83 100644 --- a/top.php +++ b/top.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/top.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:33:10 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2007-04-05 01:54:17 $ +| $Author: streaky $ +----------------------------------------------------------------------------+ */ require_once("class2.php"); @@ -110,7 +110,7 @@ if ($action == "active") { $ns->tablerender(LAN_7, $text, "nfp"); require_once(e_HANDLER."np_class.php"); - $ftotal = $sql->db_Select("forum_t", "*", "thread_parent='0'"); + $ftotal = $sql->db_Count("forum_t", "(*)", "WHERE thread_parent = 0"); $ix = new nextprev("top.php", $from, $view, $ftotal, "", "active.forum.".$view.""); } }