[web2py] Re: Multiple one-to-many join query help.

2014-01-24 Thread Anthony
When you do a join, the DAL returns rows the same way the SQL database returns them. Sounds like you're looking for more of a nested structure, which would have to be created in Python. web2py doesn't do that out of the box with joins, but you can get similar functionality using recursive selec

[web2py] Re: Multiple one-to-many join query help.

2014-01-24 Thread Apple Mason
Is there a way to get all the information returned as one row, with the focus on a particular person? For example, ... Or something similar? This would give me a single row that I can iterate through his things or pets if I need to. For example, to print out people's information: for pe

[web2py] Re: Multiple one-to-many join query help.

2014-01-22 Thread Niphlod
I'm guessing you had it wrong db(main_table.filter == something).select( main_table, other_table, left=[other_table.on(main_table.some_id == other_table.reference), ] ) On Wednesday, January 22, 2014 10:24:14 PM UTC+1, Apple Mason wrote: > > > I have the following tables: