title: Get values from two tables using a look-up table in mysql
body: <p>I would like to show all actors in movies that came out in a specific year (say 1980) and sort them by actor name.
  Thanks.</p>
  
  <pre><code>actors_table:&lt;br /&gt;
  id&lt;br /&gt;
  name&lt;br /&gt;&lt;br /&gt;
  
  movies_table:&lt;br /&gt;
  id&lt;br /&gt;
  name&lt;br /&gt;
  year&lt;br /&gt;&lt;br /&gt;
  
  cast_table: (look-up table)&lt;br /&gt;
  actor_id&lt;br /&gt;
  movie_id&lt;br /&gt;&lt;br /&gt;
  </code></pre>
  
  <p>The result would look like:<br /><br /></p>
  
  <pre><code>actor name     movie name        movie year&lt;br /&gt;
  Bill Bob       Movie One         1980&lt;br /&gt;
  Dave Smith     Movie Two         1980&lt;br /&gt;
  Jane Jones     Another Movie     1980&lt;br /&gt;
  </code></pre>