From 13b718ff963b97ba7b34da1890bab113221b775f Mon Sep 17 00:00:00 2001 From: Daniel DiPaolo Date: Wed, 26 Nov 2003 21:24:09 +0000 Subject: [PATCH] It's probably a lot more useful to list the most popular options first in the results. --- plugins/Poll.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Poll.py b/plugins/Poll.py index 1224305d5..c37895ec8 100644 --- a/plugins/Poll.py +++ b/plugins/Poll.py @@ -249,7 +249,8 @@ class Poll(callbacks.Privmsg, plugins.ChannelDBHandler): cursor.execute("""SELECT count(user_id), option_id FROM votes WHERE poll_id=%s - GROUP BY option_id""", + GROUP BY option_id + ORDER BY count(user_id) DESC""", poll_id) if cursor.rowcount == 0: s = 'This poll has no votes yet.'