title: Uncaught Error: Call to a member function fetch_assoc() on boolean
body: <p>Im trying to learn php<br>
  Im using php 7.0.1<br>
  Im using php mysqli<br>
  I saw a lot of problem like this but their solutions doesnt help me i think its because im using latest version and others uses previous version<br>
  <strong>heres my php script:</strong></p>
  
  <pre><code>&lt;?php
  session_start();
  require_once '../../../db_connect.php';
  
  $result = $db-&gt;query("select * from student where id = 1");
  
  $personalinformation = $result-&gt;fetch_assoc();
  echo $personalinformation['username'];
  ?&gt;
  </code></pre>
  
  <p><strong>heres my student table:</strong> <br></p>
  
  <pre><code>id | username | password
  1  | user1    | pass1
  2  | user2    | pass2
  3  | user3    | pass3
  </code></pre>