public function excluir_template(Template $template) { try { $this->getDb()->beginTransaction(); $sql = 'DELETE FROM testes.template WHERE pk_template=:pk_template'; $prepare = $this->getDb()->prepare($sql); $prepare->bindParam(':pk_template', $template->get_pk_template(), PDO::PARAM_INT); $prepare->execute(); $this->getDb()->commit(); } catch (Exception $e) { $this->getDb()->rollBack(); throw new Exception($e->getMessage()); } }