mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/16976] Fix search results count for PostgreSQL
PHPBB3-16976
This commit is contained in:
parent
d44dd404a3
commit
baab5a13d9
1 changed files with 1 additions and 1 deletions
|
@ -482,7 +482,7 @@ class fulltext_postgres extends base implements search_backend_interface
|
|||
// if the total result count is not cached yet, retrieve it from the db
|
||||
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_where";
|
||||
$result = $this->db->sql_query($sql_count);
|
||||
|
|
Loading…
Add table
Reference in a new issue