mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00: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:
parent
ddbc8dbf1f
commit
4d5fde9a78
1 changed files with 1 additions and 1 deletions
|
@ -278,7 +278,7 @@ function remove_common($mode, $fraction, $word_id_list = array())
|
||||||
{
|
{
|
||||||
global $db;
|
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)) )
|
if( !($result = $db->sql_query($sql)) )
|
||||||
{
|
{
|
||||||
message_die(GENERAL_ERROR, "Couldn't obtain post count", "", __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, "Couldn't obtain post count", "", __LINE__, __FILE__, $sql);
|
||||||
|
|
Loading…
Add table
Reference in a new issue