title: Call to undefined method mysqli::fetch_assoc()
body: <p>im trying to make a simple mysqli class for my self, but there is a error, that i cant resolve.
  Call to undefined method mysqli::fetch_assoc() on line 20.</p>
  
  <pre><code>public function __construct() {
      $this-&gt;db = new mysqli('localhost','username','password','web');
      if (mysqli_connect_error()) {
          die('Connect Error (' . mysqli_connect_errno() . ') '
                  . mysqli_connect_error());
      }
  }
  
  public function query($query) {
      $result = $this-&gt;db-&gt;query($query);
      return $result;
  }
  
  public function fetch($query) {
      if (!empty($query)) {
          while ($row = $this-&gt;db-&gt;fetch_assoc()) {  *//there are line 20*
              $data[] = $row;
          }
          return $data;
      } else {
          return false;
      }
  }
  </code></pre>