On Thursday, March 9, 2017 at 5:03:27 PM UTC-8, Alex Glaros wrote: > > Will your example provide both field name and field value? >
My example provides a standard ROWS object. If you print results (or, in your case, supRows) on the console, the default to-string will show the labels as tablename.fieldname and then rows of values. If you print just a single row (say [0]), you see it is a dict-like object, with the fieldnames (but not tablename) as the keys and the values as the rows.values(). <URL:http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#select> . > > am reveiving error > > CONTROLLER: supRows = db(db.Organization.id == 1).select() {{#returns > locals}} > > VIEW: > {{for record in supRows:}} > {{=record.field}} <br> > {{pass}} > > Error ticket for "ES3"Ticket ID > > 127.0.0.1.2017-03-09.16-54-06.fc1316c6-4ce4-4041-81fc-4f3ab11ce557 > <type 'exceptions.AttributeError'> > Is there something at the bottom of the ticket which shows which of your lines is doing the _getattr_ call? This exact code runs in my contoller: print results[0] print "-->" + results[0].client for record in results: if record.id > 110891: print record.tdstatus Obviously, you want to use your own fieldnames. /dps > - > > > > > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

