title: Mysql Counting rows in a table and returning an integer
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/116824/whats-the-best-way-to-get-total-of-records-in-a-mysql-table-with-php">Whats the best way to get total # of records in a mysql table with php?</a>  </p>
  </blockquote>
  
  
  
  <p>When i run :</p>
  
  <pre><code>mysql_query("SELECT COUNT(col) FROM table"); 
  </code></pre>
  
  <p>I end up with something like this : </p>
  
  <blockquote>
    <p>(Resource) mysql result #4</p>
  </blockquote>
  
  <p>How can i only get an integer that represent the number of row in my table so that later i can use it to make a simpel check such as : $result &lt; 10.</p>
  
  <p>Many Thanks</p>