Re: SQL statement runs in a loop

2010-02-04 Thread äL
On 4 Feb., 11:48, Daniel Roseman wrote: > On Feb 4, 6:23 am, äL wrote: > > > 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 li

Re: SQL statement runs in a loop

2010-02-04 Thread Daniel Roseman
On Feb 4, 6:23 am, äL wrote: > 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

SQL statement runs in a loop

2010-02-03 Thread äL
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