mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-19 16:11:21 +02:00
[ticket/16976] Fix search results count for PostgreSQL
PHPBB3-16976
This commit is contained in:
@@ -550,7 +550,7 @@ class fulltext_postgres extends \phpbb\search\base
|
|||||||
// if the total result count is not cached yet, retrieve it from the db
|
// if the total result count is not cached yet, retrieve it from the db
|
||||||
if (!$result_count)
|
if (!$result_count)
|
||||||
{
|
{
|
||||||
$sql_count = "SELECT COUNT(*) as result_count
|
$sql_count = "SELECT COUNT(DISTINCT " . (($type == 'posts') ? 'p.post_id' : 't.topic_id') . ") as result_count
|
||||||
$sql_from
|
$sql_from
|
||||||
$sql_where";
|
$sql_where";
|
||||||
$result = $this->db->sql_query($sql_count);
|
$result = $this->db->sql_query($sql_count);
|
||||||
|
Reference in New Issue
Block a user