Sorry I didn't get a chance to look at this last night. Thanks to
everyone's help I've got it working smooth like butter. :) I'm by no
means an SQL expert, so I didn't even realize what I was looking for
what an INNER join. For for anyone googling this, this is what I did
to get it working:

> for row in 
> db(db.person.department==department.id)(db.person.position==db.position.id)(db.person.rank==db.rank.id).select(orderby=db.position.sort_order|db.rank.sort_order):

And then accessing fields like: row.member.name, row.position.title,
etc.

Thanks again.


P.S. I'm REALLY digging web2py. I'm somehow more productive than I was
in Django.



On Oct 3, 1:45 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> On Sat, Oct 3, 2009 at 1:43 PM, Yarko Tymciurak <yark...@gmail.com> wrote:
> > On Sat, Oct 3, 2009 at 9:42 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> >> db(db.person.name=='Bob')(db.person.position==db.position.id).select
> >> (orderby=db.position.sort_order)
>
> > To annotate this a little more -
>
> > Checking P. 16 of the manual (*Inner Joins*) you'll see that web2py DAL
> > performs these transparently wherever the query references two or more
> > tables - so that the way you think of it should be natural.
>
> That should have said P.168...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to