mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/15496] Add sort key to SELECT in fulltext_postgres
Postgres requires that the column being ordered also appears in the SELECT part of the query. PHPBB3-15496
This commit is contained in:
@@ -498,7 +498,7 @@ class fulltext_postgres extends \phpbb\search\base
|
||||
);
|
||||
extract($this->phpbb_dispatcher->trigger_event('core.search_postgres_keywords_main_query_before', compact($vars)));
|
||||
|
||||
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id';
|
||||
$sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id, ' . $sort_by_sql[$sort_key];
|
||||
$sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
|
||||
$field = ($type == 'posts') ? 'post_id' : 'topic_id';
|
||||
|
||||
|
Reference in New Issue
Block a user