[web2py] Re: Print all items from inner join while grouping them

2016-01-24 Thread Hermann Tchehoun
Thanks Denes, it's ok ! > > > -- 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] Re: Print all items from inner join while grouping them

2016-01-24 Thread 'DenesL' via web2py-users
Hi Hermann You can add an inner loop to each user found by the original code: for row in db(db.person.id==db.thing.owner_id).select(db.person.id, db. person.name, count, groupby=db.person.name): print row.person.name, row[count] for t in db(db.thing.owner_id==row.person.id).select(db.thing.na

[web2py] Re: Print all items from inner join while grouping them

2016-01-23 Thread Hermann Tchehoun
Hi Denes, Thanks for your answer. But in your answer, you've removed the "groupby" and the count. What I need is to print the - the Owner - the quantity of thing owned -and the list of these things what you suggest don't give me the number of things. Is there a way to have all the 3 (owner, num

[web2py] Re: Print all items from inner join while grouping them

2016-01-23 Thread 'DenesL' via web2py-users
Use orderby: for row in db(db.person.id==db.thing.owner_id).select( db.person.name,db.thing.name, orderby=db.person.name): print row.person.name, row.thing.name Denes On Saturday, January 23, 2016 at 11:59:59 AM UTC-5, Hermann Tchehoun wrote: > > Hello Everyone ! > > Following