소스 검색

Fixed #20168 - Generalized a PostgreSQL specific database query in the docs.

Thanks Russ for the suggestion.
Tim Graham 12 년 전
부모
커밋
c119d0f152
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      docs/topics/db/managers.txt

+ 2 - 2
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])