Table layout:
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:
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
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.
The closest i've got to returning a single row is this:
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
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 & poster) being blank.