I'm confused using a JOIN - Statement to select my data from my MySQL Database.
Here is how the tables look like:
Table "Users"
+----+-------+----------+
| ID | Name | Password |
+----+-------+----------+
| 1 | Mike | test |
| 2 | Tony | test1 |
| 3 | Frank | test2 |
+----+-------+----------+
Table "Games"
+----+-----------+-----------+---------+---------+
| ID | Player1ID | Player2ID | ScoreP1 | ScoreP2 |
+----+-----------+-----------+---------+---------+
| 1 | 1 | 2 | 5 | 2 |
| 2 | 3 | 1 | 2 | 1 |
+----+-----------+-----------+---------+---------+
I would like to SELECT * FROM GAMES WHERE Player1ID=1 or Player2ID=1 plus the names of the users and not just their IDs.
Can someone help me with that?