Also, why doesn't this work?: record = db(db.tablename.id==1).select()[0] print record.author.email
It seems like it should work since author is a reference to auth_user and it's referencing a distinct record. On Oct 26, 11:25 pm, mdipierro <[email protected]> wrote: > Given: > > ... Field("author", db.auth_user, default=auth.user.if if auth.user > else 0) ... > > db.tablename.author.requires=IS_IN_DB(db,'auth_user.id','%(first_name) > s %(last_name)s') > > You can do > > record = db(db.tablename.id>0).select().first() > print db.auth_user[record.author].first_name > > and/or > > row= db(db.tablename.author==db.auth_user.id).select.first() > print row.tablename, row.auth_user.first_name > > On Oct 26, 10:58 pm, Wiiboy <[email protected]> wrote: > > > And then how would I get the user's info? > > > db(db.auth_user.id == db.tablename.author) > > > ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

