title: Select Multiple Values From Single Column
body: <p>I would like to select multiple values from a single column in a database table that equal to a number of values. I want all these values to match otherwise it should return no rows. I do not want to use "IN" as that is equal to "OR". </p>
  
  <p>The following is a basic mockup of what it should do <strong>but it needs to be dynamic</strong> as I wish to use it with a PDO statement. If the database only contains id's 1 and 2 it should fail ie return no rows.</p>
  
  <pre><code>SELECT
  id
  FROM
  reports
  WHERE
  id=1 AND id=2 AND id=3
  </code></pre>
  
  <p>I have the current code as follow which is incorrectly returning zero rows:</p>
  
  <pre><code>SELECT id,title
  FROM reports
  WHERE id IN (1,2)
  GROUP BY title 
  HAVING COUNT(DISTINCT id) = 2
  </code></pre>
  
  <p>My current table structure is as follows:
  <a href="http://www.sqlfiddle.com/#!2/ce4aa/1" rel="nofollow">http://www.sqlfiddle.com/#!2/ce4aa/1</a></p>