I have a query, which when I split it up in two queries works and doesn't
work when I combine the two into one query.
The following code works:
groupID=db((db.groups.ownerID==5)&(db.groups.nodeID==db.node.id)&(db.node.computedSubClassID==SC_RELATEDNAMES)).select().first().groups.id
rows=db((db.membership.groupID==groupID)&(db.membership.nodeID==db.node.id)).select()
However, these two combined doesn't work:
rows=db((db.groups.ownerID==id)&(db.groups.nodeID==db.node.id)&(db.node.computedSubClassID==SC_RELATEDNAMES)&(db.groups.id==db.membership.groupID)&(db.membership.nodeID==db.node.id)).select()
The problems is caused by this part of the code:
(db.membership.nodeID==db.node.id) Why?
Kind regards,
Annet
--
---
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/groups/opt_out.