Hi,
I am hoping someone can help with this:
I have tables setup something like this (this is a simplified
representation):
db.define_table('Users',
Field('Name'))
db.define_table('Calls',
Field('CallerName'),
Field('CreatedBy', db.Users),
Field('HandledBy', db.Users))
I need to produce a query set to send to geraldo reports that joins
both the createdby and handledby fields to db.users.id so that I can
display the users name in the report not the id. I can do one inner
join no problem and use Users.Name to get the name. To do both joins
and get useful data I think I need to do something analogue SQL AS on
the joins and then access the data using an alias. I have played with
with_alias but don't seem to get what I need. Can anyone point me in
the right direction?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.