I'm not sure I'm understanding exactly what you're trying to do. You say you want to display the value of the foreign key (which would be an integer) but in your code you seem to be only interested in the names. So this may or may not be what you want.
I've found a bug here rs = db(db.owner.id==db.dog.owner).select(db.owner.name, db.owner.name) This should be: rs = db(db.owner.id==db.dog.owner).select(db.owner.name, db.dog.name<http://db.owner.name/> ) Then you can do: for r in rs: print r.owner.name + ' : ' + r.dog.name -- 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-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.