我正在学校学习php,收到此警告
警告:mysqli_num_rows()期望参数1为mysqli_result
为什么?
<?php
require "conn.php";
$user_name = "123";
$user_pass = "123";
$mysql_qry = "SELECT * FROM employeedata where username = '$user_name' and password = '$user_pass';";
$result = mysqli_query($conn, $mysql_qry);
if(mysqli_num_rows($result) > 0) {
echo "login success";
}
else {
echo "login not success";
}
?>