title: mySQL multiple select from two tables (filtering)
body: <p>I have two tables at my DB that i want to make a select query
  First one keeps the product id (int) and if the product is published
  The second table keeps the filters, and matches with id_product (which is basicaly the product_id from Products) . at id_filter_child we have the value</p>
  
  <p>products</p>
  
  <pre><code>product_id,
  published
  </code></pre>
  
  <p>filters</p>
  
  <pre><code>id_pro_fil,
  id_product,
  id_filter_child
  </code></pre>
  
  <p>My tables now are:</p>
  
  <p>products</p>
  
  <pre><code>1     yes
  2     yes
  3     no
  </code></pre>
  
  <p>filters</p>
  
  <pre><code>10   1    4
  11   1    5
  12   2    4
  13   2    6
  14   2    7
  </code></pre>
  
  <p>So that is my DB at the moment.
  From input i have the filters that i want to search 
  So i want to select all products with filter=4
  i use:</p>
  
  <pre><code>SELECT * FROM products,filters
  WHERE products.product_id=filters.id_product
       AND products.published='1'
       AND filters.id_filter_child='4'
  </code></pre>
  
  <p>That one works!</p>
  
  <p>Now i need to select all products with filter 4 AND 6.
  I use:</p>
  
  <pre><code>SELECT * FROM products,filters
  WHERE products.product_id=filters.id_product
       AND products.published='1'
       AND filters.id_filter_child='4'
       AND filters.id_filter_child='6'
  </code></pre>
  
  <p>but i doesnt work
  (as a result i would want the product with id=2)</p>
  
  <p>Some help please</p>
  
  <p>Thanks in advance</p>