I've got the rows to be displayed in a table:
rows = db(query).select(db.orders.total.sum().with_alias('Total'),
...............)
and using
SQLTABLE(rows)
to show the data.
How can I format this total.sum() in the SQLTABLE? More specifically, this
total is the total amount in cents, and I need to display it in dollars,
i.e. divide by 100 and append with '$'.
It's easy to do it if using TABLE and iterating over rows, but SQLTABLE is
pretty convenient to use, so I'd like to stick with it.
Is there a way to customize the fields like this in SQLTABLE ?
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/5e7fe1f6-fb89-48d1-b353-1df884d0afadn%40googlegroups.com.