title: Doing a three table join in MySQL
body: <p>This is my table</p>
  
  <pre><code>program_join ('program_join_id, member_ID, program_schedule_id');
  
  program_schedule (program_scedule_id, program_id, datetime');
  
  program ('program_id, program_name);
  </code></pre>
  
  <p>This is my mysql</p>
  
  <pre><code>$mySql = "SELECT 
              program_join.program_join_id,
              member.member_username, 
              program_join.program_schedule_id
  
              FROM program_join
  
                  INNER JOIN member ON
                  program_join.member_ID=member.member_ID
                  ORDER BY program_join_id";
  
  
  $myQry = mysql_query($mySql, $DB)  or die ("wrong query : ".mysql_error());
  $number = $hal; 
  while ($myData = mysql_fetch_row($myQry)) {
      $number++;
      $code = $myData[0];
  ?&gt;
  &lt;tr align="center"&gt;
      &lt;td&gt;&lt;?php echo $number;?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo  $myData[1];?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo  $myData[2];?&gt;&lt;/td&gt;
  </code></pre>
  
  <p>result</p>
  
  <pre><code>No      username      program schedule
  1        lalala          1
  2        bababba         2
  </code></pre>
  
  <p>and under the 'program schedule', i want to show the program name that i have from the ' program_join.program_schedule_id'</p>
  
  <p>please help me</p>