title: Get only results from table "products" if they have entries in two other tables (identified by ID and product type columns)
body: <p>I have a table with "products" that stores a product ID and product type (string).</p>
  
  <p>I'd like to retrieve all those "products", joining them to two other tables that list two individual products and ignore all other products that are not found in these two tables. I have the "product_type" inside the "products" table.</p>
  
  <p>Here's a sample structure:</p>
  
  <ol>
  <li><p>Table <code>products</code> (ID, idProduct, type)</p>
  
  <p>1|3|tv</p>
  
  <p>2|4|tv</p>
  
  <p>3|13|phone</p></li>
  <li><p>Table <code>tvs</code> (ID, name)</p>
  
  <p>3|Sony</p>
  
  <p>4|Phillips</p></li>
  <li><p>Table <code>phones</code> (ID, name)</p>
  
  <p>13|Samsung Galaxy</p></li>
  </ol>
  
  <p>Even if there are duplicate idProduct values in <code>products</code> we are identifying/joining by also checking the <code>type</code> column. Currenly, my approach using <code>LEFT JOIN</code> to both tables does not work correctly, because it doesn't return any values in case <code>proucts</code> contains only one type of product.</p>