我在准备好的陈述中列出评论时遇到了问题.有任何想法吗?
这是我的代码:
$fetchComments = $cnx -> prepare("SELECT comment FROM comments WHERE video_id=? LIMIT 1");
$fetchComments -> bind_param('s', $row['id']);
$fetchComments -> execute();
$fetchComments -> store_result();
$fetchComments -> bind_result($vid_comment);
if ($fetchComments -> num_rows > 0) {
whike ($row = mysqli_fetch_assoc($vid_comment)){
echo $row['comment'];
}
}
Run Code Online (Sandbox Code Playgroud)