title: MySQL - get rows with same ID but different specific values on another column
body: <p>I know the title isn't very helpful, part of the reason I'm having trouble figuring this out on my own is I can't figure out how to word it, so I can't google it.</p>
  
  <p>Anyway, I'm making a Netflix style website with movies and TV shows ripped from my DVD collection. It's a LAMP stack running off my Raspberry Pi. I want to have the option to search by genre by selecting genres from a bunch of check boxes. I want it to work so that if I check "horror" and "comedy", the search results only return movies/TV shows that have BOTH those genres, not either/or.</p>
  
  <p>So I have a couple MySQL tables, THR_MOVIE, THR_SHOW, and THR_GENRE. The structures of THR_MOVIE and THR_SHOW aren't really important for this question, just know that each movie/TV show takes up just one row and has a unique ID. Here's the structure of THR_GENRE:</p>
  
  <pre><code>CREATE TABLE `THR_GENRE` (
  `media_id` INT(7) UNSIGNED NOT NULL,
  `genre` VARCHAR(255) NOT NULL,
  `media_type` ENUM('movie','show') NOT NULL,
  `date_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`media_id`, `genre`, `media_type`))
  </code></pre>
  
  <p>Obviously if media_type is 'movie', then media_id is a THR_MOVIE ID and not a THR_SHOW ID. Some example data from the genres table might look like this:</p>
  
  <pre><code>row 1: media_id=12, genre='horror', media_type='movie'
  row 2: media_id=12, genre='comedy', media_type='movie'
  </code></pre>
  
  <p>So how would this query work? I need to get the movie data, so I need to join THR_MOVIE with THR_GENRE to get the movies, then do the same with THR_SHOW and THR_GENRE to get the TV shows.</p>