diff options
author | Joe Robinson <joe@mumsnet.com> | 2014-07-25 15:42:33 +0100 |
---|---|---|
committer | Joe Robinson <joe@mumsnet.com> | 2014-07-25 15:42:33 +0100 |
commit | 9325bafbbf17da50dd8e5855e12fdff4ed590ea1 (patch) | |
tree | e4a3c6057647a9a97f67272b529839c501960e33 /poll.go | |
parent | 07884e5c9b4fe423d10b1f4a9b6366f7d81cffb2 (diff) |
Fixed poll list to list the 5 most recent polls
Diffstat (limited to 'poll.go')
-rw-r--r-- | poll.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |