I see what you are doing and I like it. I think it may be tricky to implement but I look forward to see what you come up to.
I think: *db( (db.sample.id>0) and (db.example.id>0) and (db.random.id>0)).select()* * * should be * * *db( (db.sample.id>0) & (db.example.id>0) & (db.random.id>0)).select()* * * since "and" is a reserved keyword and cannot be overloaded. I think you are asking about select(orderby=*~db.sample.id)* On Friday, 20 July 2012 11:03:30 UTC-5, ade wrote: > > I am trying to work in Web2py's union method and am wondering a few things > > if I have a query > > *db( (db.sample.id>0) and (db.example.id>0) and (db.random.id>0)).select() > * > > I would like to know how to orderby the latest ids > > as well when I am displaying a page link *<a href="{{=URL('view', > 'page1', args=row.id)}}* or whatever I may have a another page to link to > with in the loop *<a href="{{=URL('view', 'page2', args=row.id)}} > * > How can I do a check to see what table I am selecting from > > if row == table1: > display_this_link > elif row == table2: > display 2nd link > > *cheers > > and ty :-) > > > --