title: Count rows from results of a "mysql_query"
body: <p>If I have this:</p>
  
  <pre><code>$results = mysql_query("SELECT * FROM table_name WHERE id=$id");
  </code></pre>
  
  <p>is there then any way to check how many rows which have a field-value of "Private" or "Company" ?</p>
  
  <p>I need to show the user how many "Private" and "Company" records where found, without making another query. (There is a column called 'ad_type' which contains either "private" or "company")</p>
  
  <p>I already know the mysql_num_rows for counting all rows!</p>
  
  <p>EDIT:
  There are 500thousand records! So maybe an iteration through the result is slow, what do you think?</p>
  
  <p>Thanks for all help :)</p>