public function getArrayDados() { $con = Database::getConnection(); $stmt = $con->prepare("\n SELECT *\n FROM vs_estudantes\n WHERE cd_info_estudos = {$this->dto->getCdInfoEstudos()}\n "); $stmt->execute(); $return = $stmt->fetch(PDO::FETCH_ASSOC); return $return; }
/** * @param InfoEstudosDTO $dto * @return bool|DataTransferObject * @throws Exception */ public function gravar(InfoEstudosDTO $dto) { if ($dto->getCdInfoEstudos() == '') { if (!($obj = $this->insert($dto))) { throw new Exception('Impossível Inserir Informações'); } } else { if (!($obj = $this->update($dto))) { throw new Exception('Impossível Atualizar Informações'); } } return $obj; }