sorry for the generic title but I don't know how to explain this in a few words. I have a user_role table, it's part of a classical structure to manage a realm in tomcat with a database/jdbc. It's like this:
userid | roleid user1 | role1 user1 | role2 user2 | role2 user2 | role3
How can I write a query in mysql (if it's possible) to have a result like this:
| role1 | role2 | role3 | user1 | x | x | | user2 | | x | x |
Thanks in advance
Cheers
Matteo