From fecff85ac06d45f8f4183360ddff7d05b1ac4c8c Mon Sep 17 00:00:00 2001 From: Jon Stovell Date: Sun, 26 Nov 2023 20:05:45 -0700 Subject: [PATCH] Adds GROUP BY clause to query in SMF\Poll::getMostRecent() Signed-off-by: Jon Stovell --- Sources/Poll.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Poll.php b/Sources/Poll.php index 961684f572..3c04280ee0 100644 --- a/Sources/Poll.php +++ b/Sources/Poll.php @@ -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, );