On 5/3/06, Adrian Holovaty <[EMAIL PROTECTED]
> wrote:
On 5/3/06, tsnyder <[EMAIL PROTECTED] > wrote:
> I think I have missed something in the documentation, and I am hoping someone
> can help me. What is the django equivalent of doing something like this:
>
> select * from event where semester_id = 1 and category_id = 2
>
> Where the event table is related to two other tables (semester and category).
Hi Tamara,
If you're using the Django development version, try this:
Event.objects.filter(semester__id__exact=1, category__id__exact=2)
If you're using Django 0.91 or earlier, try this:
events.get_list(semester__id__exact=1, category__id__exact=2)
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---