title: Get count query results with ignoring the LIMIT statement
body: <p>I have a simple query as follows:</p>
  
  <pre><code>$q = "SELECT * FROM blah WHERE disabled = '0'";
  </code></pre>
  
  <p>Now for pagination, I need to add <code>LIMIT</code> to my query, so:</p>
  
  <pre><code>$q = "SELECT * FROM blah WHERE disabled = '0' LIMIT 10,20";
  </code></pre>
  
  <p>And still, I want to know about the number of all rows with <code>mysql_num_rows</code>, but in the above query it is always 10, since I'm limiting the results, so for the number of all rows I need to do the same query again without <code>LIMIT</code> statement.</p>
  
  <p>And it's somehow stupid to run the same query twice to just get the number of all rows, anybody has a better solution?</p>
  
  <p>Thanks</p>