title: mysql query to find specific data
body: <p>think a table like this</p>
  
  <pre><code>  PRODUCT ID  QTY
  
  (2,6)      2 
  (2,7)      0
  (3,8)      0
  (7,5)      2
  (6,5)      2
  (8,5)      2  
  </code></pre>
  
  <p>i am supposed to find product_attribute which has a value as 2.but it should only display the result as all the product_attributes has a value of 2.</p>
  
  <p>The output should be like this</p>
  
  <pre><code>PRODUCT ID   QTY
  
  (7,5)  2
  (6,5)  2
  (8,5)  2
  </code></pre>
  
  <p>but i am getting a result like</p>
  
  <pre><code>PRODUCT ID  QTY
  
  (2,6)  2
  (7,5)  2
  (6,5)  2
  (8,5)  2
  </code></pre>
  
  <p>please help me:(</p>