title: MySQL query returns only one row in pdo
body: <p>My MySQL query is displaying just one row (instead of all of the rows), but when I do a COUNT on the query, it shows the correct number of rows in the query. What seems to be the problem here? </p>
  
  <pre><code>$sql5 = "SELECT m.*, i.*, COUNT(*) AS num, m.id AS m_id FROM members m JOIN roommate_seek i ON m.id = i.member_id
                WHERE _school = :school AND i.category = :category";
  
  foreach ($db-&gt;query($sql5, array('school' =&gt; $_GET['school'], 'category' =&gt; $category)) AS $result3)
  {
      echo "{$result3['m_id']}";
  }
  </code></pre>