title: Unexpected array values from MySQL Query
body: <p>I know this is basic, but I can't seem to find the answer:</p>
  
  <p>I have a query that returns the desired rows in PHPMyAdmin but am clearly doing something wrong on my page because it only seems two return rows in the array.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>$editgroupid =  'm101';
  
  $query = "SELECT dentists.id
      from groups, groupdentlink, dentists
      WHERE groups.id = '$editgroupid'
      AND groups.id = groupdentlink.f_group_id
      AND groupdentlink.f_dent_id = dentists.id
      ORDER BY dentists.name";
  
      $resultdent = mysql_query($query) or die(mysql_error());
  
      $dents = mysql_fetch_array($resultdent);
      print_r(array_values($dents));
  </code></pre>
  
  <p>On the page I get:</p>
  
  <p>Array ( [0] => UTG69 [1] => UTG69 )</p>
  
  <p>But in PHPMyAdmin I get like 40 rows.</p>