db, $s); if (mysqli_num_rows($q) > 0){ $r = mysqli_fetch_array($q); $this->id = $r["id"]; $this->name = $r["name"]; $this->description = $r["description"]; $this->start = $r["start"]; if (!is_null($r["end"])){ $this->end = $r["end"]; } $this->place = new Place($this->db, $this->lang, $r["place"]); if (!is_null($r["route"])){ $this->route = new Route($this->db, $r["route"]); } } } } ?>