title: prepared statements fetch_assoc php mysqli
body: <p>I'm having problems with listing out comments with prepared statements. Any ideas?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$fetchComments = $cnx -&gt; prepare("SELECT comment FROM comments WHERE video_id=? LIMIT 1");
  $fetchComments -&gt; bind_param('s', $row['id']);
  $fetchComments -&gt; execute();
  $fetchComments -&gt; store_result();
  $fetchComments -&gt; bind_result($vid_comment);
  if ($fetchComments -&gt; num_rows &gt; 0) {
      whike ($row = mysqli_fetch_assoc($vid_comment)){
      echo $row['comment'];
      }
  }
  </code></pre>