Why does mysql_num_rows($result) return 1 even if $result returns empty result set?
$resut=mysql_query("select * from tablename where column1='$memberid' and (TIME_TO_SEC(TIMEDIFF(NOW(),when_submit))/60<2)")or die(mysql_error());
$count=mysql_num_rows($result);
when I echo $count, I get
1
.
You have a spelling error in your code. You store the result of the call to mysql_query() in the variable called $resut. That should be $result, since that is what you are passing in the call to mysql_num_rows()