mysqli_num_rows找不到任何东西

时间:2017-10-22 13:59:53

标签: php mysqli

$stmt2 = $conn->query("SELECT * FROM link WHERE id = ?");
$stmt2->bind_param('s', $id);
$stmt2->execute();

$row_cnt = mysqli_num_rows($stmt2);

if($row_cnt == 0) {
    header('Location: http://example.com/doesntexist');
}

即使存在ID,这也行不通......我做错了什么?

0 个答案:

没有答案