Join for table using foreign keys
<p>I have a table called player_league that looks like this: <a href="https://i.stack.imgur.com/DPiU5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DPiU5.png" alt="enter image description here"></a></p>

<p>The userID and leagueID are foreign keys referencing columns in the users and leagues table respectively. </p>

<p>I want to query the database to get all the users who would have a leagueID of 1 from the player_leagues table.</p>

<p>This query </p>

<pre><code>SELECT leagueID from users join player_league pl WHERE pl.leagueID = 1
</code></pre>

<p>returns data that looks like <a href="https://i.stack.imgur.com/N1M1w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N1M1w.png" alt="enter image description here"></a></p>

<p>Being that I am new to mySQL and SQL in general, I was wondering what I was doing wrong? I believe it has something to do with my joins but it may have been how I set up my tables, I'm just not sure. There is no leagueID in the users table, so I'm not sure why each user would have a leagueID of 1. </p>