title: SELECT COUNT(DISTINCT name), id, adress from users
body: <p>With PHP I'm trying to run a SQL query and select normal columns as well as COUNT.</p>
  
  <pre><code>$sql_str =  "select COUNT(DISTINCT name), id, adress from users";
  $src = mysql_query($sql_str);
  
  while( $dsatz = mysql_fetch_assoc($src) ){
      echo $dsatz['name'] . "&lt;br&gt;";
  }
  </code></pre>
  
  <p>The problem is that when I have "COUNT(DISTINCT name)," in my query, it will only return the first entry. When I remove it, it will return all matching entries from the db.</p>
  
  <p>I could separate it and do 2 queries, but I'm trying to avoid this due to performance concerns.</p>
  
  <p>What do I make wrong?
  thx, Mexx</p>