Hi everybody!

I want to find all entries in a database where two specific fields are
equal:

mytable.objects.filter(column_a='column_b')

But this gives me no results at all. I now managed to get it done with
a .extra(), but I was wondering if this is the only possible solution.
All examples in the documentation work with static values for
comparison and there are no further details about the right hand side
of the query.

Thanks for reading!
Thomas.

P.S.:
Here's the query which get's the work done:
mytable.objects.extra(where=['column_a=column_b'])


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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