sumAuditorHours = db.a_wlp2_distrib.LC_HOURS + db.a_wlp2_distrib.SM_HOURS + db.a_wlp2_distrib.LB_HOURSsubjects = db((db.a_groups.id == group) & (db.a_wlp2_distrib.MODULE == module) & (db.a_wlp2.PARENT_ITEM != None)).select(db.s_disc_names.id,db.s_disc_names.FULL_NAME,db.a_wlp2.CHAIR,sumAuditorHours,orderby=db.s_disc_names.FULL_NAME, join=[db.a_wlp2.on(db.a_groups.WLP == db.a_wlp2.WLP), db.a_wlp2_distrib.on(db.a_wlp2.id == db.a_wlp2_distrib.WLP_ITEM), db.s_disc_names.on(db.a_wlp2.DISC_NAME == db.s_disc_names.id)])
SELECT s_disc_names.id, s_disc_names.FULL_NAME, a_wlp2.CHAIR, ((a_wlp2_distrib.LC_HOURS + a_wlp2_distrib.SM_HOURS) + a_wlp2_distrib.LB_HOURS)FROM a_groupsJOIN a_wlp2 ON (a_groups.WLP = a_wlp2.WLP)JOIN a_wlp2_distrib ON (a_wlp2.id = a_wlp2_distrib.WLP_ITEM)JOIN s_disc_names ON (a_wlp2.DISC_NAME = s_disc_names.id)WHERE (((a_groups.id = 2277) AND (a_wlp2_distrib.MODULE = 3)) AND (a_wlp2.PARENT_ITEM IS NOT NULL)) ORDER BY s_disc_names.FULL_NAME
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/871e5991-8ddb-4c85-a1a9-72accc1c5aba%40googlegroups.com.
sumAuditorHours = (db.a_wlp2_distrib.LC_HOURS + db.a_wlp2_distrib.SM_HOURS + db.a_wlp2_distrib.LB_HOURS)
fields = [db.s_disc_names.id.with_alias('id'),db.s_disc_names.FULL_NAME-with_alias('full_name'),
db.a_wlp2.CHAIR.with_alias('chair'),sumAuditorHours.with_alias('auditor_hours'),
]subjects = db((db.a_groups.id == group) & (db.a_wlp2_distrib.MODULE == module) & (db.a_wlp2.PARENT_ITEM != None)).select(*fields, ...
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/GiDioBnqHts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CANPTPxKc8HqS7JsU%2ByzB8FN4%2BDV7Oz8%3DR6DET98H-mD8xDojew%40mail.gmail.com.