title: php + mysql_num_rows
body: <p>is there a more efficient way of doing the following?</p>
  
  <pre><code>$total_a = mysql_query("SELECT `id` FROM `table` WHERE `this` = 'that'");
  $total_b = mysql_num_rows($total_a);
  
  if(!$total_b)
  {
      echo 'no results';
  }
  else
  {
      $a = mysql_query("SELECT `id`, `time` FROM `table` WHERE `this` = 'that' ORDER BY `time` DESC");
      while($b = mysql_fetch_assoc($a))
      {
          echo $b['id'].'-'.$b['time'].'&lt;br /&gt;';
      }
  }
  </code></pre>
  
  <p>there is no other way around than <strong>using two queries</strong> for this, is there?</p>