title: PHP MySQLI prepared statement breaks at get_results()
body: <p>I am very new at mysqli prepared statements, in fact this is my first try at it. I have this block of code and I put echos inbetween each command, and it displays aaa and bbb but not ccc, what am i doing wrong here?</p>
  
  <p>no errors come up, just a blank screen:</p>
  
  <pre><code>&lt;?php
  
          $mysqli = new mysqli("localhost", "username", "password", "database");
  
          if (mysqli_connect_errno()) {
                  printf("Connect failed: %s\n", mysqli_connect_error());
                  exit();
          }
  
          if ($stmt = $mysqli-&gt;prepare("SELECT title FROM `in-the-press`")) {
                  $stmt-&gt;execute();
  
                  echo 'aaa';
  
                  $stmt-&gt;bind_result($title);
  
                  echo 'bbb';
  
                  $result = $stmt-&gt;get_result();
  
                  echo 'ccc';
  
                  while ($stmt-&gt;fetch()) {
                          printf("%s %s\n", $title);
                  }
  
                  echo 'ddd';
  
                  $stmt-&gt;close();
  
          }
  
          $mysqli-&gt;close();
  
  ?&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong> I was able to get this working, by doing the following:</p>
  
  <pre><code>&lt;?php
  
              $mysqli = new mysqli("localhost", "username", "password", "database");
  
              if (mysqli_connect_errno()) {
                      printf("Connect failed: %s\n", mysqli_connect_error());
                      exit();
              }
  
              if ($stmt = $mysqli-&gt;prepare("SELECT id, community, map, image FROM `googleMaps`")) {
  
                  $stmt-&gt;execute();
  
                  $stmt-&gt;bind_result($id, $community, $map, $image);
  
                  $stmt-&gt;fetch();
  
                  printf($id . ' ' . $community . ' ' . $map . ' ' . $image);
  
                  $stmt-&gt;close();
  
          }
  
  ?&gt;
  </code></pre>
  
  <p>but this only gives me 1 row of data, how do I get all rows of data?</p>