Пример #1
0
 public function insere(PojoPessoa $pessoa)
 {
     $conex = PDOConnectionFactory::getConnection();
     try {
         $stmt = $conex->prepare("INSERT INTO colaborador (cpf, nome) VALUES (?, ?)");
         $stmt->bindValue(1, $pessoa->getCpf());
         $stmt->bindValue(2, $pessoa->getNome());
         // executo a query preparada
         $stmt->execute();
         // fecho a conexão
         $conex = null;
         // caso ocorra um erro, retorna o erro;
     } catch (PDOException $ex) {
         echo "Erro: " . $ex->getMessage();
     }
 }
 public function DepartamentoDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnection();
 }
 public function __construct()
 {
     $this->conex = PDOConnectionFactory::getConnection();
 }
 public function ContatoDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnection();
 }
 public function UteisDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnection();
 }
Пример #6
0
 public function GrupoDAO($mode)
 {
     $this->conn = PDOConnectionFactory::getConnection($mode);
 }
 public function ClienteDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnectionConstrutor();
 }
 public function Close()
 {
     if (self::$con != null) {
         self::$con = null;
     }
 }
 public function RodapeDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnection();
 }
 public function AdministracaoDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnection();
 }
 public function MenuAdminDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnection();
 }
 public function InformativoDAO()
 {
     $this->conexao = PDOConnectionFactory::getConnection();
 }