__construct(); } function __construct(){ $this->conn = db_connect("dns"); $sql = "SELECT id AS locationId, navn AS locationTitle FROM lokaler ORDER BY navn ASC"; $result = $this->conn->query($sql); if (DB::isError($result) != true){ $this->locations = $result; } } public function getList(){ return $this->locations; } public function displayList(){ ?> locations->fetchRow(DB_FETCHMODE_ASSOC)){ $loc = new Location($row['locationId']); $loc->displayList(); } print("
lokaler  
"); } } ?>