title: Quickest way to get total records from a mysql table in PHP
body: <p>Below is the current code I use to get the total number of photos in a DB, An estimated number would even be acceptable as the number of results is just used to determine which folder number I would like to upload into for folder balance of files.</p>
  
  <p>I have a feeling there is a better way then I am using below?</p>
  
  <pre><code>$sql = 'SELECT auto_id FROM friend_user_photo';
  $query = executeQuery($sql);
  $rowcount = mysql_num_rows($query);
  </code></pre>
  
  <p>$rowcount returns number of record in the friend_user_photo table</p>
  
  <p>UPDATE:</p>
  
  <p>Isn't there a way to read information about a database. that might be quicker then using above method or COUNT?</p>