mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user