This is probably much simpler than I'm making it out to be but I need a list of my users with a column that shows the name of the group(s) they've joined.
Here's the schema:
+---------+-------------+
| uid | name |
+---------+-------------+
| 1 | user 1 |
| 2 | user 2 |
| 3 | user 3 |
| 4 | user 4 |
| 5 | user 5 |
+---------+-------------+
+---------+-------------+
| gid | name |
+---------+-------------+
| 1 | group 1 |
| 2 | group 2 |
| 3 | group 3 |
| 4 | group 4 |
| 5 | group 5 |
+---------+-------------+
+---------+-------------+
| gid | uid |
+---------+-------------+
| 1 | 1 |
| 2 | 1 |
| 3 | 4 |
| 4 | 4 |
| 5 | 5 |
+---------+-------------+



Reply With Quote


Bookmarks