title: MySQL - count total number of rows in php
body: <p>What is the best MySQL command to count the total number of rows in a table without any conditions applied to it? I'm doing this through php, so maybe there is a php function which does this for me? I don't know. Here is an example of my php:</p>
  
  <pre><code>&lt;?php
  $con = mysql_connect("server.com","user","pswd");
  if (!$con) {
    die('Could not connect: ' . mysql_error());
  }
  
  mysql_select_db("db", $con);
  
  $result = mysql_query("some command");
  $row = mysql_fetch_array($result);
  
  mysql_close($con);
  ?&gt;
  </code></pre>