title: How to use MySQL Found_Rows() in PHP?
body: <p>I try to avoid doing Count(<em>) because of performance issue.  (i.e. SELECT COUNT(</em>) FROM Users)</p>
  
  <p>If I run the followings in phpMyAdmin, it is ok:</p>
  
  <pre><code>  SELECT SQL_CALC_FOUND_ROWS * FROM Users;
    SELECT FOUND_ROWS();
  </code></pre>
  
  <p>It will return # of rows. i.e. # of Users.  </p>
  
  <p>However, if I run in in PHP, I cannot do this:</p>
  
  <pre><code>  $query = 'SELECT SQL_CALC_FOUND_ROWS * FROM Users;
      SELECT FOUND_ROWS(); ';
    mysql_query($query);
  </code></pre>
  
  <p>It seems like PHP doesn't like to have two queries passing in.  So, how can I do that?</p>