title: Counting records with 2 criteria s
body: <p>How do I count database records having 2 criteria.</p>
  
  <p>Here is the pic:</p>
  
  <p><a href="https://i.stack.imgur.com/9fYt8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9fYt8.png" alt="enter image description here"></a></p>
  
  <p>I want to count posts which have condition 12 <strong>&amp;</strong> 18 only. So after post 11 I should have the counter at value 1. Post 5, 6, 7, 9, 10 should not be counted since condition 12 &amp; 18 don't show up.</p>
  
  <p>To get the idea here is a query: </p>
  
  <pre><code>SELECT COUNT(post) from post_condition
  where `condition`=18 AND  `condition`=12 
  </code></pre>
  
  <p>But this is wrong, I tried with some sub-queries but without success.</p>