franky
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
4 tables - 1 query
in MySQL Help
Posted
I need to create a permission system, where multiple permissions can be assigned to multiple roles. These roles can then be assigned to multiple users.
These are the tables where the permissions and roles are stored:
Now, I need to create 2 tables (don\'t know if I got it right) to hold what permissions belong to what roles, and what roles belong to what users:
I know how to assign permissions/roles, add new ones, etc. But I have no idea how to get all available permissions for a user id in a single query. I know how to do it in multiple queries, but I want to do it in 1 query. I know it\'s possible, I just don\'t know how.
Could anyone help me on this issue?