summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-03-31 03:40:44 -0400
committerTim Graham <timograham@gmail.com>2013-03-31 03:40:44 -0400
commitc119d0f152e939420613868294d58fa4b902e18a (patch)
tree062d4a048fb927764c29e3ca6cf6ea8305ef7d90
parentb5e1e2ec0320bc5b114b7dbffc8cbf16cefb0a4f (diff)
Fixed #20168 - Generalized a PostgreSQL specific database query in the docs.
Thanks Russ for the suggestion.
-rw-r--r--docs/topics/db/managers.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/db/managers.txt b/docs/topics/db/managers.txt
index 8762717e09..56bdd16e84 100644
--- a/docs/topics/db/managers.txt
+++ b/docs/topics/db/managers.txt
@@ -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])