On Tuesday, October 22, 2013 3:22:09 PM UTC-4, Diogo Munaro wrote:

> But the book is wrong?
> Here: 
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=join#Inner-joins
>

What do you see wrong in the book? Note, using the WHERE clause still does 
an inner join, it just doesn't do it via a JOIN clause. The book even 
clarifies this (see highlighted text below):

There is an alternative syntax for INNER JOINS:

>>> rows = 
>>> db(db.person).select(join=db.thing.on(db.person.id==db.thing.owner_id))
>>> for row in rows:
    print row.person.name, 'has', row.thing.name
Alex has Boat
Alex has Chair
Bob has Shoes

While the output is the same, the generated SQL in the two cases can be 
different.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to