Exemple #1
0
 public function carrega()
 {
     $this->conectar();
     $query = "SELECT * FROM shows;";
     $resultado = $this->query($query);
     $this->desconectar();
     if (!is_bool($resultado)) {
         foreach ($resultado as $result) {
             $show = new Show();
             $show->setId($result["id"]);
             $show->setLocal($result["local"]);
             $show->setData($result["data"]);
             $this->addShow($show);
         }
     }
 }