Yes that was the problem, thanks!
On Mon, Nov 30, 2009 at 18:21, Craig Kimerer wrote:
> No guarantees that this will fix the issue, but have you tried escaping the
> '%'?
>
> Try `Semestre.objects.extra(where=['num %% 2 = 0'])` and this may give you
> your desired result. Looks like an issue wit
No guarantees that this will fix the issue, but have you tried escaping the
'%'?
Try `Semestre.objects.extra(where=['num %% 2 = 0'])` and this may give you
your desired result. Looks like an issue with python string formatting.
Alternatively, you could try `print Semestre.objects.extra(where=['n
Hi, I'm trying to do a query where I select all rows where a field is
divisible by 2. In pure SQL this is what I want:
select * from contenido_semestre where num % 2 = 0;
which works fine. When trying to do it with Django I do
Semestre.objects.extra(where=['num % 2 = 0'])
But this gets me an empty
3 matches
Mail list logo