mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-10-17 17:37:22 +02:00
It's probably a lot more useful to list the most popular options first in the
results.
This commit is contained in:
parent
ea23b47163
commit
13b718ff96
@ -249,7 +249,8 @@ class Poll(callbacks.Privmsg, plugins.ChannelDBHandler):
|
|||||||
cursor.execute("""SELECT count(user_id), option_id
|
cursor.execute("""SELECT count(user_id), option_id
|
||||||
FROM votes
|
FROM votes
|
||||||
WHERE poll_id=%s
|
WHERE poll_id=%s
|
||||||
GROUP BY option_id""",
|
GROUP BY option_id
|
||||||
|
ORDER BY count(user_id) DESC""",
|
||||||
poll_id)
|
poll_id)
|
||||||
if cursor.rowcount == 0:
|
if cursor.rowcount == 0:
|
||||||
s = 'This poll has no votes yet.'
|
s = 'This poll has no votes yet.'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user