title: Combine two SQL Tables with a where Variable
body: <p>Can't seem to get it right. I am trying to join two tables in my form and the WHERE is a variable taken from the URL (www.websiste.com?reference=38)</p>
  
  <p>Both tables have the same commonkey (ProgramCode)</p>
  
  <p>Table 1: programs:
  id_program | ProgramName |  ReleaseDate | ProgramCode</p>
  
  <p>Table 2: ProgramGenre:
  id_program_genre | ProgramCode | id_genre</p>
  
  <p>I got this but its not working</p>
  
  <pre><code>$sql_select = "SELECT * FROM program
                          INNER JOIN ProgramGenre
                              ON program.ProgramCode = ProgramGenre.ProgramCode               
                      WHERE ProgramCode='$_GET[reference]'";
  </code></pre>
  
  <p>What am i doing wrong here? </p>