Answer the question
In order to leave comments, you need to log in
Is it even possible to make such a query in Mysql?
select all roles whose access is equal to the access of the selected role or (there are fewer accesses but they are equal, there are no others)
select * from roles
left join roles_routes
on roles.id = roles_routes.role_id
where roles_routes.access in (select access from roles_routes where role_id=1)
Answer the question
In order to leave comments, you need to log in
... where roles_routes.access in (select access from roles_routes where role_id=1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question