title: Join 3 tables with 2 where clauses
body: <p>I have problem with sql query. I need to join 3 tables with 2 where clauses.</p>
  
  <p>First table is:</p>
  
  <p><strong>new_product_to_category</strong></p>
  
  <pre><code>product_id|category_id
  3|1507
  3|1507
  4|1507
  </code></pre>
  
  <p>Second is:</p>
  
  <p><strong>new_product_to_store</strong></p>
  
  <pre><code>product_id|store_id
  3|2
  3|3
  4|2
  </code></pre>
  
  <p>The Last one:</p>
  
  <p><strong>new_product_description</strong></p>
  
  <pre><code>product_id|name
  3|something
  4|something2
  </code></pre>
  
  <p>And the query looks like</p>
  
  <pre><code>SELECT pts.product_id, pd.name FROM new_product_to_category ptc 
                  LEFT JOIN new_product_to_store pts ON pts.product_id = ptc.product_id AND pts.store_id = 3 
                  LEFT JOIN new_product_description pd ON pts.product_id = pd.product_id 
                  WHERE ptc.category_id = 1507
  </code></pre>
  
  <p>I need to get result only with products which are in CATEGORY 1507 AND ARE FROM STORE 3... is that possible? Thanks for replies</p>