title: How can I retrieve data from 3 tables in mysql - join assistance?
body: <p>Table layout: </p>
  
  <p><img src="https://i.stack.imgur.com/LnIlf.png" alt="enter image description here"></p>
  
  <p>Hi, I would like to retrieve a combination of information from the above tables, primarily a single row of results from the 'episode' table, but also some information from the 'tvshow' table and the 'season' table, that also only applies to that single row I want to retrieve from the 'episode' table, this is my query at the moment:</p>
  
  <pre><code>Select tvshow.series_name, season.season_banner, season.season_poster, episode.season_num, episode.episode_num, episode.episode_name, episode.plot
  FROM tvshow,season,episode
  WHERE episode.tvshow_id = 1 AND episode.season_num = 1 and episode.episode_num = 1
  </code></pre>
  
  <p>I'm aware I'd need to use a join, but i'm unsure how to go about doing this, with regards to combining the results from 3 tables.</p>
  
  <p>The closest i've got to returning a single row is this:</p>
  
  <pre><code>SELECT tvshow.series_name, season.season_banner, season.season_poster, episode.season_num, episode.episode_num, episode.episode_name, episode.plot
  FROM episode
  INNER JOIN tvshow ON episode.tvshow_id = tvshow.tvshow_id
  INNER JOIN season ON episode.season_num = season.season_num
  WHERE episode.tvshow_id =1
  AND episode.season_num =1
  AND episode.episode_num =1
  </code></pre>
  
  <p>That returns the row I want, yet also returns an identical second row aside from the fields that only exist in the season table (season banner &amp; poster) being blank.</p>