Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #20168 - Generalized a PostgreSQL specific database query in th…

…e docs.

Thanks Russ for the suggestion.
  • Loading branch information...
commit c119d0f152e939420613868294d58fa4b902e18a 1 parent b5e1e2e
Tim Graham timgraham authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/topics/db/managers.txt
4 docs/topics/db/managers.txt
View
@@ -70,8 +70,8 @@ returns a list of all ``OpinionPoll`` objects, each with an extra
SELECT p.id, p.question, p.poll_date, COUNT(*)
FROM polls_opinionpoll p, polls_response r
WHERE p.id = r.poll_id
- GROUP BY 1, 2, 3
- ORDER BY 3 DESC""")
+ GROUP BY p.id, p.question, p.poll_date
+ ORDER BY p.poll_date DESC""")
result_list = []
for row in cursor.fetchall():
p = self.model(id=row[0], question=row[1], poll_date=row[2])
Please sign in to comment.
Something went wrong with that request. Please try again.