handle = new mysqli($host, $user, $password, $db); } public function close() { $this->handle->Close(); } public function query($query) { $stmt = $this->handle->query($query); if($stmt->num_rows == 0) { $result = NULL; } else { $result = array(); while($res = $stmt->fetch_object()) { $result[] = $res; } } /* elseif($stmt->num_rows == 1) { $result = $stmt->fetch_object(); } */ return $result; } } ?>