I'm having problems with listing out comments with prepared statements. Any ideas?
Here is my code:
$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'];
}
}