From 4d5fde9a782310afbcf5841e9bcc23da88ef4065 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 3 Mar 2002 19:28:44 +0000 Subject: [PATCH] Change to count method in word_common ... problem seemed to exist on older PHP versions for some reason git-svn-id: file:///svn/phpbb/trunk@2257 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/search.php b/phpBB/includes/search.php index 4898e747f5..c8d40a8d58 100644 --- a/phpBB/includes/search.php +++ b/phpBB/includes/search.php @@ -278,7 +278,7 @@ function remove_common($mode, $fraction, $word_id_list = array()) { global $db; - $sql = ( $mode == "global" ) ? "SELECT COUNT(DISTINCT post_id) AS total_posts FROM " . SEARCH_MATCH_TABLE : "SELECT SUM(forum_posts) AS total_posts FROM " . FORUMS_TABLE; + $sql = ( $mode == "global" ) ? "SELECT COUNT(post_id) AS total_posts FROM " . SEARCH_MATCH_TABLE . " GROUP BY post_id" : "SELECT SUM(forum_posts) AS total_posts FROM " . FORUMS_TABLE; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't obtain post count", "", __LINE__, __FILE__, $sql);