title: Fetching a single row of data from the database with a prepared statement
body: <p>I'm having some issues with this.</p>
  
  <p>I'm still new to mysqli and prepared statements.</p>
  
  <p>I receive the following error:</p>
  
  <blockquote>
    <p>Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 4294967296 bytes) in <strong>**********</strong> on line 191</p>
  </blockquote>
  
  <pre><code>$id = $_GET['id'];
  
  $stmt = $db-&gt;prepare("SELECT id, news_title, news_body, news_poster FROM rr_news WHERE id = ?");
  $stmt-&gt;bind_param('i', $id);
  $stmt-&gt;execute();
  
  $stmt-&gt;bind_result($news_id, $news_title, $news_body, $news_author); // this is line 191
  
  $stmt-&gt;fetch();
  </code></pre>
  
  <p><a href="http://prntscr.com/3kma1a" rel="nofollow">http://prntscr.com/3kma1a</a> - this is the contents of the entire database. as you can see, it is very small.</p>
  
  <p>Anyone know what I'm doing wrong?</p>
  
  <p>Thanks.</p>