Tree Help
Hi,
I'm wondering if anyone can help me. I'm looking to use a tree for the following structure (keys put in to show how the tables work):
We have three main tables:
* users (pk:user_id)
* roles (pk:role_id)
* groups (pk:group_id)
A user can have many roles, a role can have many groups, so there are two joining tables:
* users_roles (pk:ur_id,fk:user_id,fk:role_id)
* group_roles(pk:gr_id,fk:group_id,gk:role_id)
I want to have a tree which has a list of users which I can then expand to show me a list of roles that user has. Then, I can expand the role and see the groups assigned to that role. Is this at all possible?
I have the SQL which does the table joins etc (so I can see what roles a user is in, groups in those roles) however I am unable to map this into the tree component.
Any help is very much appreciated.
Thanks,