title: php mysqli prepared statement
body: <p>Hey, I have a quick one. Is there any way to include a variable into a prepared query? example:</p>
  
  <pre><code>$sql = "SELECT id, title, author, LEFT(description, 40) AS excerpt, 
                 image_small, image_med, date 
          FROM posts 
          ORDER BY id DESC 
          LIMIT $start, $postsPerPage";
  
  $result = $connect-&gt;prepare($sql) or die ('error');
  $result-&gt;execute();
  $result-&gt;bind_result($id, $title, $author, $excerpt, $image_small, $image_med, $date);
  </code></pre>
  
  <p>Thanks!</p>