I have these two tables:
USERS:
| ID | Name |
+----------+-----------+
| 1 | Name1 |
+----------+-----------+
| 2 | Name2 |
+----------+-----------+
| 3 | Name3 |
+----------+-----------+
| 4 | Name4 |
+----------+-----------+
LAG:
| ID | Lagid | userid |
+----------+-----------+-----------+
| 1 | 1106 | 1 |
+----------+-----------+-----------+
| 2 | 1105 | 1 |
+----------+-----------+-----------+
| 3 | 1106 | 2 |
+----------+-----------+-----------+
| 4 | 1105 | 3 |
+----------+-----------+-----------+
Here you see that user Name1 is member of lag 1106 and 1105.
If i want to list all users that are member of lag 1106, it will use table LAG to establish which users belongs to this lag.
(LAG IS NORWEGIAN FOR TEAM, if you wondered).
Anybody who can help me? I haven't tried searching, because I don't know what to search for.