users = db(~db.auth_group.role.like('user%')).select(db.auth_user.id, db.auth_user.first_name, db.auth_user.last_name, db.auth_group.role,
left=(db.auth_membership.on(db.auth_user.id==db.auth_membership.user_id), db.auth_group.on(db.auth_membership.group_id==db.auth_group.id)),
orderby=db.auth_user.id|db.auth_group.id)
response.flash=db._lastsql
return dict(users=users)
SELECT auth_user.id
,auth_user.first_name
,auth_user.last_name
,auth_group.ROLE
FROM auth_user
LEFT JOIN auth_membership ON (auth_user.id = auth_membership.user_id)
LEFT JOIN auth_group ON (auth_membership.group_id = auth_group.id)
WHERE (NOT (auth_group.ROLE LIKE 'user%' ESCAPE '\'))
ORDER BY auth_user.id
,auth_group.id;
SELECT auth_user.id
,auth_user.first_name
,auth_user.last_name
,auth_group.ROLE
FROM auth_user
LEFT JOIN auth_membership ON (auth_user.id = auth_membership.user_id)
LEFT JOIN auth_group ON auth_membership.group_id = auth_group.id and
NOT auth_group.ROLE LIKE 'user%'
ORDER BY auth_user.id
,auth_group.id;
--
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.
For more options, visit https://groups.google.com/d/optout.
users=db().select(
db.auth_user.id, db.auth_user.first_name, db.auth_user.last_name, db.auth_group.role,
left=[db.auth_membership.on(db.auth_user.id == db.auth_membership.user_id),
db.auth_group.on(db.auth_membership.group_id==db.auth_group.id)])