view = PATH::VIEW . "optimizer.php"; $s = $this->build_query(); $q = $db->query($s); while ($r = $q->fetchArray(SQLITE3_ASSOC)){ array_push($this->teams, new Team($r["id"])); } $s = " SELECT id FROM unit WHERE player = '" . $PLAYER->id . "'; "; $this->title = "Optmizer - SWDB"; $this->description = "Optimizer"; $this->canonical = URL::BASE . "optmizer/"; } /** * Builds the query to the rune table using the selected or default * filters. * * @return string The query to be executed. * @global Player Currently selected player. */ private function build_query(){ global $PLAYER; $s = " SELECT id FROM team WHERE player = '" . $PLAYER->id . "' ORDER BY area_type, area "; return $s; } } ?>