Hey all, I've got some issues writing this query out, so maybe I can get some help I have 4 tables: User (default from django) Profile (foreign key is User) Access (foreign Key is User and Team) Team
I want make a roster for each team, so I would do the following "select * from access where team = team.id and access lvl = xxx) This would return a list of users that belong to a team and have the correct access level to see team (incase they've previously left the team.. etc) But I'd like to grab all the profiles that are associated with those user names that I just selected so it would be a (select * from profiles join (select * from access where team=team.id and access lvl =xxx)) Is there an easy way to do this?? I've gotten to roster = Access.objects.filter(team = team_profile).exclude(status = "NON", status = "WAT") to grab my user list... but to grab the associated profiles with that user list I'm stuck on... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

