我检查记录是否存在:mysql_num_rows导致内部服务器错误
$query = "SELECT * FROM `collegeInfo` WHERE `name` = '$name' ";
$existed = mysqli_query($con, $query);
echo mysql_num_rows($existed);
第三行给我的错误:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
什么建议吗?谢谢!
您需要添加错误检查。尝试'$ exists = mysqli_query($ con,$ query)或die(mysqli_error($ con));' – Barmar
另外,当您遇到500错误时,您应该检查服务器上的PHP错误日志以获取详细信息。 – Barmar
为什么不回应'mysqli_error($ con)'? –