[web2py] Re: displaying associated name.

2010-05-20 Thread mdipierro
>>> db.define_table('me',Field('mom','reference me'),Field('name')) >>> me=db.me.insert(name='Kim') >>> me.mom=me >>> print me.mom.mom.mom.mom.mom.name Kim On May 20, 1:14 pm, Yanni wrote: > Yes that worked. Kinda weird :) > > pet.category.category_name worked. > > Thank you very much. > > Ya

[web2py] Re: displaying associated name.

2010-05-20 Thread Yanni
Yes that worked. Kinda weird :) pet.category.category_name worked. Thank you very much. Yanni. On May 20, 11:06 am, "mr.freeze" wrote: > It will do it automatically. You should be able to do: > pet.category.name > > On May 20, 12:58 pm, Yanni wrote: > > > I'm slightly confused as to how to re

[web2py] Re: displaying associated name.

2010-05-20 Thread mr.freeze
It will do it automatically. You should be able to do: pet.category.name On May 20, 12:58 pm, Yanni wrote: > I'm slightly confused as to how to reference a field when I have the > foreign key. > > table pets: > pets.id > name > category (foreign key category.id) > description > > table category: