Skip to content

Commit

Permalink
Adds GROUP BY clause to query in SMF\Poll::getMostRecent()
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed Nov 27, 2023
1 parent ad83575 commit fecff85
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,7 @@ protected function getMostRecent(&$options): int
FROM {db_prefix}polls AS p
' . (implode("\n\t\t\t\t", $this->joins)) . '
WHERE (' . (implode(")\n\t\t\t\tAND (", $this->where)) . ')
GROUP BY p.id_poll
ORDER BY ' . (implode(', ', $this->order)),
$this->params,
);
Expand Down

0 comments on commit fecff85

Please sign in to comment.