title: Error can't fetch mysqli_result but fetches it anyways
body: <p>So I'm working on a small bunch of code, and it fetches the result of the query and prints it out but it also gives me this:</p>
  
  <p>Warning: mysqli_result::fetch_assoc(): Couldn't fetch mysqli_result in /var/www/vhosts/apexfunrun.com/httpdocs/dev/timer.php on line 24</p>
  
  <pre><code>    $query = "SELECT field_pep_rally_date_value FROM dr_content_type_school WHERE nid = '$schoolname'";
  
  if ($result = $mysqli-&gt;query($query)) {    
  while ($row = $result-&gt;fetch_assoc()) {
      $date = $row['field_pep_rally_date_value'];
      $date = str_replace('-', '/', $date);
          echo date('Y-m-d', strtotime($date));
          $result-&gt;close();
      }
  }
  $mysqli-&gt;close();
  </code></pre>