I have user and user_role tables.
The user_role table has two columns:
user_id
role_name
I want to find users that have multiple roles at the same time, for example ‘admin‘ and ‘moderator‘.
How can I build this query?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need two joins, one for filtering admins, and the other one for moderators: