$qrysc = "select * from `communities` where `name` like \"%$key%\" or `type` like \"%$key%\" or `about` like \"%$key%\" union all select * from `personal` where `fname` like \"%$key%\" or `lname` like \"%$key%\" or `country` like \"%$key%\" or `state` like \"%$key%\" or `city` like \"%$key%\"";
$rqrysc=mysql_query($qrysc);
$numqrysc=mysql_num_rows($rqrysc);
Here communities and personal are two different tables on the same database. I am trying to search in both tables to generate output depending on the result found. I am getting error
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in F:\WORK STATION\xampplite\htdocs\GlobalDost\search\sprocess.php on line 10
line 10 is
$numqrysc=mysql_num_rows($rqrysc);
. Please tell me what's wrong or suggest me something else to achieve my goal.