Hi,
I have some records in my db that I need to access to get them and perform
some calculations on.
My code to access the records is:
rows = db(db.voltrin.id > 0).count()
currentrow = rows - 4
for x in range(currentrow, rows):
record = db.voltrin(db.voltrin.id==x)
adv_list.append(float(record.adv_issues))
dec_list.append(float(record.dec_issues))
adv_vlist.append(float(record.adv_vol))
dec_vlist.append(float(record.dec_vol))
Is this the right way to access the record at a given id?
The data I seem to get with any of my lists does not match any of the data
in the tables which is why I am unsure of the proper way to access the data
for a record.
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.