Thanks! That was exactly what I was looking for. 

El domingo, 9 de noviembre de 2014 22:41:08 UTC-3, Anthony escribió:
>
> The default Row object doesn't have the table name. However, if you set 
> the "compact" attribute of the Rows object to False, each Row object will 
> act like a dictionary with the table name as the top-level key, but this 
> will require row.tablename.fieldname syntax to access each field. You can 
> also check the keys of a given record in the "records" attribute of the 
> Rows object to get the tablename. The best approach will depend on the 
> details of your code, so it might help to see some code.
>
> Anthony
>
> On Sunday, November 9, 2014 8:03:44 PM UTC-5, Lisandro wrote:
>>
>> I have a query to the database where the select is made in a different 
>> table each time the query is executed. So the resulting rows will be 
>> sometimes from one table, sometimes from another table. 
>> I want to iterate the rows and get the tablename of the table they 
>> belong. 
>>
>> I've checked the Row class documentation [1] but i can't find the way to 
>> do it. Am I missing something obvious? Any tip will by appreciated.
>>
>> [1] - 
>> http://web2py.com/examples/static/epydoc/web2py.gluon.dal.Row-class.html
>>
>

-- 
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/d/optout.

Reply via email to