我正在处理使用分页脚本的成员列表,它给我以下错误
mysqli_num_rows()期望参数1为mysqli_result,给定为null
$stmt = $db->prepare("SELECT * FROM users");
$stmt->execute();
$result = $stmt->get_result();
$count = mysqli_num_rows($result);
if ($count < 1) {
echo "<h1 class='text-center'>No Users</h1>";
} else {
$count = ceil($count / $per_page);