Re: [web2py] Re: Display table as dictionary

2014-05-05 Thread Dave S
On Sunday, May 4, 2014 10:04:06 PM UTC-7, Jonathan Lundell wrote: > > On 4 May 2014, at 9:46 PM, Massimo Di Pierro > > > wrote: > > fields = db(db.address.business==4L).select().first().as_dict() > > > AttributeError: 'NoneType' object has no attribute 'as_dict' > > (just sayin'...) > Sounds

[web2py] Re: Display table as dictionary

2014-05-04 Thread Greg Vaughan
tyvm Massimo exactly what I was looking for... it works perfectly and now the rest of my code works :) On Monday, 5 May 2014 14:46:19 UTC+10, Massimo Di Pierro wrote: > > fields = db(db.address.business==4L).select().first().as_dict() > > On Sunday, 4 May 2014 16:59:34 UTC-5, Greg Vaughan wrote:

Re: [web2py] Re: Display table as dictionary

2014-05-04 Thread Jonathan Lundell
On 4 May 2014, at 9:46 PM, Massimo Di Pierro wrote: > fields = db(db.address.business==4L).select().first().as_dict() AttributeError: 'NoneType' object has no attribute 'as_dict' (just sayin'...) > > On Sunday, 4 May 2014 16:59:34 UTC-5, Greg Vaughan wrote: > > The following code > > fields

[web2py] Re: Display table as dictionary

2014-05-04 Thread Massimo Di Pierro
fields = db(db.address.business==4L).select().first().as_dict() On Sunday, 4 May 2014 16:59:34 UTC-5, Greg Vaughan wrote: > > > The following code > > fields = db(db.address.business==4L).select().as_dict() > > returns a dictionary of dictionaries > > {1L: {'street_name': 'Another', 'postcode': '4