This question already has an answer here:
if(mysql_num_rows($result))
{
echo "no match found!";
}
it is throwing an error-
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\Hosting\6448289\html\includes\getQuestion.php on line 72
You need to check the return value of
mysql_query
If
mysql_query
fails it returnsboolean
false
instead of aresource
.When you pass this
boolean
value tomysql_num_rows
you get this error.