aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/search/fulltext_native.php
diff options
context:
space:
mode:
authorDavidIQ <david@davidiq.com>2016-09-16 17:05:20 -0400
committerDavidIQ <david@davidiq.com>2016-09-16 17:05:20 -0400
commit2ae08dc3bab67b850f878f757ee8028d35fec35b (patch)
tree41f13e4c9aa9865e038f525bb31dbb945334a92e /phpBB/phpbb/search/fulltext_native.php
parent6d589a8bb9d24133b2d8b2d4bbf0623931bc438c (diff)
downloadforums-2ae08dc3bab67b850f878f757ee8028d35fec35b.tar
forums-2ae08dc3bab67b850f878f757ee8028d35fec35b.tar.gz
forums-2ae08dc3bab67b850f878f757ee8028d35fec35b.tar.bz2
forums-2ae08dc3bab67b850f878f757ee8028d35fec35b.tar.xz
forums-2ae08dc3bab67b850f878f757ee8028d35fec35b.zip
[ticket/14782] Don't use 'DISTINCT' when using 'SQL_CALC_FOUND_ROWS'
Diffstat (limited to 'phpBB/phpbb/search/fulltext_native.php')
-rw-r--r--phpBB/phpbb/search/fulltext_native.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 99837f3e28..63b0b24edf 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -1262,7 +1262,7 @@ class fulltext_native extends \phpbb\search\base
if (!$total_results && $is_mysql)
{
// Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
- $sql_calc = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS ' . $select, $sql);
+ $sql_calc = str_replace('SELECT ' . $select, 'SELECT SQL_CALC_FOUND_ROWS ' . $select, $sql);
$result = $this->db->sql_query($sql_calc);
$this->db->sql_freeresult($result);