diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/querysets.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index e25bea0e69..b20c6e34e5 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -968,11 +968,11 @@ of the arguments is required, but you should use at least one of them. Example:: - Entry.objects.extra(where=['id IN (3, 4, 5, 20)']) + Entry.objects.extra(where=["foo='a' OR bar = 'a'", "baz = 'a'"]) ...translates (roughly) into the following SQL:: - SELECT * FROM blog_entry WHERE id IN (3, 4, 5, 20); + SELECT * FROM blog_entry WHERE (foo='a' OR bar='a') AND (baz='a') Be careful when using the ``tables`` parameter if you're specifying tables that are already used in the query. When you add extra tables |
