summaryrefslogtreecommitdiff
path: root/poll.go
diff options
context:
space:
mode:
Diffstat (limited to 'poll.go')
-rw-r--r--poll.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/poll.go b/poll.go
index 8a204f1..eda5a8f 100644
--- a/poll.go
+++ b/poll.go
@@ -148,7 +148,7 @@ func hasUserVotedInPoll(db *sqlite3.Conn, poll Poll, user User) bool {
func getRecentPolls(db *sqlite3.Conn) ([]Poll, error) {
- sql := "SELECT * FROM polls LIMIT 5"
+ sql := "SELECT * FROM polls ORDER BY id DESC LIMIT 5"
s, err := db.Query(sql)
row := make(sqlite3.RowMap)
var polls = make([]Poll, 5)