title: MYSQL num rows error
body: <p>Hi I am trying to use a piece of code which I have used before to quickly test out an idea, however I Keep getting the following error.</p>
  
  <p>Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in</p>
  
  <pre><code>$result = mysql_query("SELECT * FROM masterip_details WHERE timedate(datetime) = CURDATE() and ip_address='$ip_address");
  $num_rows = mysql_num_rows($result);
  if( $num_rows &gt; 0 ) {
  </code></pre>