在下面的代码中mysql_num_rows($result) == 0
总是返回true,即使它中有行
$sql = "SELECT * FROM `kit-workshop` WHERE `wid` = ".$_SESSION['workshop']." AND returned is NULL";
echo $sql;
$result=mysqli_query($conn,$sql);
if (mysql_num_rows($result) == 0) {
echo("<script>alert('All kits from this workshop have been added');</script>");
mysqli_query($conn,"UPDATE workshop set status = 'close'");
echo("<a href='kit.html'>Go to home</a>");
}