a select returns a LIST of row(s).

either you do 

row = db(whatever).select().first()
print row.some_field

or

rows = db(whatever).select()
for row in rows:
    print row.some_field 

On Monday, August 18, 2014 5:09:37 PM UTC+2, Tom Russell wrote:
>
> I have some simple code that is suppose to grab data from a row in my db 
> table.
>
> I do it like:
>
> row = db(db.voltrin.startdate == mydate).select()
> vwtrin = row.vw_trin
>
> I have run this and verified mydate and whatever other variables I have 
> are something other than null but I cannot seem to get the data for the 
> field in my code above. I can see in the pycharm debugger that the row has 
> the colnames listed but I do not see any records or values.
>
> Am I doing this right?
>
> Thanks,
>
> Tom
>

-- 
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.

Reply via email to