Mysqli result while loop returns null : <p>This code used to work last time i checked then i made some changes (but didn't change the core actions) and now it doesn't and i can't understand why, is there something i'm missing?</p>

<pre><code>require("./dbAccess.php");
mysqli_set_charset($dbConnection, 'utf8mb4');

if($query = mysqli_query($dbConnection, 
"SELECT * FROM table")){
mysqli_close($dbConnection);

  while($row = mysqli_fetch_assoc($query));
    {
      var_dump($row);
    }
}
else {echo (mysqli_error($dbConnection)); mysqli_close($dbConnection);}
</code></pre>

<p>The table has 2 rows, mysqli_num_rows confirms it and if i var_dump without the loop i correctly get the first row but as soon as it goes through the loop the var_dump results null.</p>

<p>Thanks</p>
