错误警告:mysqli_num_rows()期望参数1为mysqli_result为什么?

时间:2018-11-03 13:06:02

标签: php mysql

我正在学校学习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";
}

?>

0 个答案:

没有答案