title: prepared statement is not working for SELECT statement
body: <p>When I'm using SQL select statements with prepared statements code works fine and display content when I'm run that in my computer localhost using WAMP server.</p>
  
  <p>But when I'm upload this code to my web hosting. No any result display or no any error display.But without prepared statement code works fine in the web hosting and display results. here is my codes with and without prepared statements. Please tell me why that happens?</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>&lt;?php 
  
  for($i=0;$i &lt;$count; $i++){
  
      require('connection.php');
      $stmt = $connection-&gt;prepare("SELECT * FROM comment WHERE status = 'Approved' limit 1 offset ?");
      $stmt-&gt;bind_param('s', $id);
      $stmt-&gt;execute(); 
      $result = $stmt-&gt;get_result();                                          
  
      if($result-&gt;num_rows &gt; 0) {
          while($row = $result-&gt; fetch_assoc()){                          
  
          $pst_content = $row['content'];
          $author = $row['commentator'];
  
          if($i==0){
  
              echo '&lt;div class="item active"&gt;';
              echo '      &lt;blockquote&gt;';
              echo '&lt;div class="row"&gt;';
              echo '&lt;div class="col-sm-12"&gt;';
              echo "      &lt;p style='color:#a07936'&gt;$pst_content&lt;/p&gt;";
              echo "&lt;small&gt;$author&lt;/small&gt;";
              echo '      &lt;/div&gt;';
              echo '      &lt;/div&gt;';
              echo '      &lt;/blockquote&gt;';
              echo '      &lt;/div&gt;';
  
          }else{
  
              echo '&lt;div class="item"&gt;';
              echo '      &lt;blockquote&gt;';
              echo '&lt;div class="row"&gt;';
              echo '&lt;div class="col-sm-12"&gt;';
              echo "      &lt;p style='color:#a07936'&gt;$pst_content&lt;/p&gt;";
              echo "&lt;small&gt;$author&lt;/small&gt;";
              echo '      &lt;/div&gt;';
              echo '      &lt;/div&gt;';
              echo '      &lt;/blockquote&gt;';
              echo '      &lt;/div&gt;';                                    
          }
  
      }
      }
  }         
  ?&gt;
  </code></pre>