Hi,
I am a newbie and am trying to select fields from two table related to
each other using a foreign key:
class Reporter()
id primary key
name
e-mail
...
class Article()
reporter = model.ForeignKey(reporter)
date
...
Now I want to implement the following SQL statement in Django:
select name,e-mail,date from Reporter,Article where reporter = 10
I tried filter, select_related, etc. but I could not get what I want.
Any help will be greatly appreciated
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---