I have an SQL statement in views.py:

karatekas = Karateka.objects.extra(where = ["bsc = 1 OR skr =
1"]).select_related()

This statement runs in a loop an no data will come back.

If I change the little word "OR" to "AND",

karatekas = Karateka.objects.extra(where = ["bsc = 1 AND skr =
1"]).select_related()

the right data will show up.


Why does it not work with "OR"?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to