所以我得到的错误是这个 mysql_num_rows() 期望参数 1 是资源,在 /home 第 80 行中给出的布尔值
这是我的代码
}if($action['result'] != 'error'){
mysql_query ("INSERT INTO Matching VALUES('$firstName','$lastName','$buddy','$party','$sex','$req_sex','$skill','$req_skill','$phone')");
$match_buddy= mysql_query("SELECT * FROM Matching WHERE Buddytype='$buddy'");
$numrow_buddy = mysql_num_rows($match_buddy);
if($numrow_buddy < $party-1)
{
echo "no matches";
}if($numrow_buddy >= $party-1)
{echo "$numrow_buddy";
//matching the sex
Line 80 $match_sex= mysql_query("SELECT * FROM Matching WHERE Sex='$req_sex' AND First Name !='$firstname' AND Last Name !='$lastName'");
$numrow_sex = mysql_num_rows($match_sex);
if($req_sex == 3)
{ // if they dont care which sex they have move automatically onto skill
$match_skill= mysql_query("SELECT * FROM Matching WHERE Skill='$req_skill', First Name !='$firstname', Last Name !='$lastName'");
$numrow_skill = mysql_num_rows($match_skill);