title: get number of rows from last query, Wordpress
body: <p>I am working on a wordpress platform, while generating a mysql query I want to display the number of rows from that query. An example is shown below.</p>
  
  <pre><code>$query = ("SELECT wp_posts.ID, wp_term_relationships.object_id
       FROM wp_posts
       LEFT JOIN wp_term_relationships ON wp_posts.ID = wp_term_relationships.object_id
       WHERE post_date &lt;= '$now'
       AND term_taxonomy_id = '$catid'
       AND post_date &gt;= '$then' 
       AND post_status = 'publish'");
  </code></pre>
  
  <p>Now when I generate this query into phpmyadmin, it gives the following output 
  <em>Showing rows 0 - 5 (6 total, Query took 0.0013 sec)</em></p>
  
  <p>I want to display the number of rows i-e 6 total ...
  so what function i must use to display it ??</p>