title: mysql_num_rows gives waring when no data found in database
body: <p>I have a query which perform fine, but the problem is somehow its gives me the warning when no data match from database. </p>
  
  <pre><code>$count = mysql_num_rows($qry); //warning here
  </code></pre>
  
  <p>I can use <code>@</code> to hide the error, but this is not good programming as far i know, so how can i hide the warning from the output?</p>
  
  <blockquote>
    <p><strong>The Warning:</strong> Warning: mysql_num_rows() expects parameter 1 to be
    resource, boolean given in [somepage.php] on line [11]</p>
  </blockquote>
  
  <pre><code>$count = @mysql_num_rows($qry); //No warning
  </code></pre>
  
  <p>So i know there will be the ways to hide the warning, but i don't know. please help me on this.</p>