title: MYSQL filter results after inner join and where
body: <p>I have a mysql query via inner join as:</p>
  <pre><code>SELECT * FROM oc_product
  INNER JOIN oc_product_to_category ON oc_product.product_id = oc_product_to_category.product_id 
  WHERE oc_product_to_category.category_id = 100
  </code></pre>
  <p>so far ok, it returns the rows from table oc_product that correspond to oc_product_to_category.category_id = 100</p>
  <p>I want to select from these results the common rows from table oc_product
  where oc_product_to_category.category_id = 101 or oc_product_to_category.category_id = 102 etc...</p>
  <p>How can I accomplish this?</p>
  <p>I tried via having as:</p>
  <pre><code>SELECT * FROM oc_product
  INNER JOIN oc_product_to_category ON oc_product.product_id = oc_product_to_category.product_id 
  WHERE oc_product_to_category.category_id = 101 OR oc_product_to_category.category_id = 102
  having (oc_product_to_category.category_id = 301)
  </code></pre>
  <p>but with wrong results.</p>
  <p>Can someone point me to the right direction (logic) ?</p>