It's probably a lot more useful to list the most popular options first in the

results.
This commit is contained in:
Daniel DiPaolo 2003-11-26 21:24:09 +00:00
parent ea23b47163
commit 13b718ff96
1 changed files with 2 additions and 1 deletions

View File

@ -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.'