diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-09-17 00:04:59 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-09-17 00:04:59 +0200 |
commit | 33584f12f0c717e18f47a77e13df57a0905dae8c (patch) | |
tree | 344e32913d74a835d58548c6142fe33237e46ba1 /phpBB/phpbb/search/fulltext_native.php | |
parent | 32ba128ea55a6ff5aa10277b4164d7dca740dfaa (diff) | |
parent | 2ae08dc3bab67b850f878f757ee8028d35fec35b (diff) | |
download | forums-33584f12f0c717e18f47a77e13df57a0905dae8c.tar forums-33584f12f0c717e18f47a77e13df57a0905dae8c.tar.gz forums-33584f12f0c717e18f47a77e13df57a0905dae8c.tar.bz2 forums-33584f12f0c717e18f47a77e13df57a0905dae8c.tar.xz forums-33584f12f0c717e18f47a77e13df57a0905dae8c.zip |
Merge pull request #4449 from DavidIQ/ticket/14782
[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.php | 2 |
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); |