title: MYSQL - Show results only if both tables have entries
body: <p>I have two tables:  <code>Tracking</code>, and <code>Files</code>.</p>
  
  <ul>
  <li>Tracking contains lots of fields with track_id as the primary key.</li>
  <li>Files contains a file_id, track_id, filename, and approved.</li>
  </ul>
  
  <p>The <code>track_id</code> is obviously linking the files record back to the tracking record.  The can be multiple files records for the same track_id</p>
  
  <p>What I need to do is to display a list of all records in tracking, that have files that have not been approved.  </p>
  
  <p>Right now for testing, I have one tracking record that has 3 files associated with it.  My thought process was to use Left Join with the following statement:</p>
  
  <pre><code>   SELECT * 
       FROM tracking 
  LEFT JOIN files ON tracking.track_id = files.track_id 
      WHERE (tracking.archived = '0' AND approved = '0') 
   ORDER BY tracking.po_number;
  </code></pre>
  
  <p>This however will return the same record 3 times to me.  I guess I need to add a unique clause somewhere, but every where I think it should go, gives me an SQL statement error.</p>