Beispiel #1
0
 private function Execute()
 {
     $this->Connect();
     try {
         $this->Update->execute(array_merge($this->Datas, $this->Places));
         $this->Result = true;
     } catch (PDOException $e) {
         $this->Result = null;
         WMErro("<b>Erro ao atualizar:</b> {$e->getMessage()}", $e->getCode());
     }
 }
Beispiel #2
0
 private function Execute()
 {
     $this->Connect();
     try {
         $this->Create->execute($this->Datas);
         $this->Result = $this->Conn->lastInsertId();
     } catch (PDOException $e) {
         $this->Result = null;
         WMErro("<b>Erro ao cadastrar no banco de dados:</b> {$e->getMessage()}", $e->getCode());
     }
 }
Beispiel #3
0
 private function Execute()
 {
     $this->Connect();
     try {
         $this->Delete->execute($this->Places);
         $this->Result = true;
     } catch (PDOException $e) {
         $this->Result = null;
         WMErro("<b>Erro ao deletar:</b> {$e->getMessage()}", $e->getCode());
     }
 }
Beispiel #4
0
 private function Execute()
 {
     $this->Connect();
     try {
         $this->getSyntax();
         $this->Read->execute();
         $this->Result = $this->Read->fetchAll();
     } catch (PDOException $e) {
         $this->Result = null;
         WMErro("<b>Erro ao ler:</b> {$e->getMessage()}", $e->getCode());
     }
 }