Yeah, I agree. I read the documentation and I have no clue what is happening there. Are there two people named Alex? Does 'Alex' own two items? Why is it grouping by person name instead of person id? Why is 'count' assigned as a count of person IDs, used as an argument in the select (presumably it's just an int?) and then used as an iterator (assuming the count of person IDs is 2, then it's just getting row 2?)?
On Thursday, April 25, 2013 12:55:46 PM UTC-7, Domagoj Kovač wrote: > > count = db.person.id.count() > > I understand this line of code, it is obvious that limitby clause here > would be stupid. > > >>> for row in db(db.person.id==db.thing.owner_id).select( > db.person.name, count, groupby=db.person.name): > print row.person.name, row[count] > Alex 2 > Bob 1 > > I don't understand what is the purpose of the count here, and is this > count related to the count above. > > > -- --- 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.