當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Conexao::closeConexao方法代碼示例

本文整理匯總了PHP中Conexao::closeConexao方法的典型用法代碼示例。如果您正苦於以下問題:PHP Conexao::closeConexao方法的具體用法?PHP Conexao::closeConexao怎麽用?PHP Conexao::closeConexao使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Conexao的用法示例。


在下文中一共展示了Conexao::closeConexao方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: autentica

 public function autentica($login, $senha)
 {
     $conexao = new Conexao();
     $tabelaLogin = "sistutor.login";
     $dbCon = $conexao->getConexao();
     $sql = "select * from " . self::$tabela . " join {$tabelaLogin} on {$tabelaLogin}.id_login = " . "gestor.login " . "where {$tabelaLogin}.login = \$1 and " . "{$tabelaLogin}.senha = \$2";
     $result = pg_query_params($dbCon, $sql, array($login, $senha));
     if (pg_fetch_assoc($result)) {
         $conexao->closeConexao();
         return true;
     } else {
         $conexao->closeConexao();
         return false;
     }
 }
開發者ID:RaelCappra,項目名稱:SisTutor,代碼行數:15,代碼來源:GestorDao.php

示例2: update

 function update($polo)
 {
     $conexao = new Conexao();
     $dbCon = $conexao->getConexao();
     $sql = "update " . self::$tabela . " set nome=\$1, cidade=\$2, uf=\$3 where id_polo=\$4";
     $params = array($polo->getNome(), $polo->getCidade(), $polo->getEstado(), $polo->getId());
     pg_query_params($dbCon, $sql, $params);
     $conexao->closeConexao();
 }
開發者ID:RaelCappra,項目名稱:SisTutor,代碼行數:9,代碼來源:PoloDao.php

示例3: daoFetchAll

 public function daoFetchAll($query, $params = 0)
 {
     $conexao = new Conexao();
     $connection = $conexao->getConexao();
     if ($params) {
         $result = pg_query_params($connection, $query, $params);
     } else {
         $result = pg_query($connection, $query);
     }
     $conexao->closeConexao();
     return pg_fetch_all($result);
 }
開發者ID:RaelCappra,項目名稱:Estacionamento-FIXED,代碼行數:12,代碼來源:Dao.php

示例4: getTipos

 function getTipos()
 {
     $conexao = new Conexao();
     $dbCon = $conexao->getConexao();
     $sql = "select * from sistutor.tipo_curso";
     $result = pg_query($dbCon, $sql);
     $tarefas = array();
     while ($linha = pg_fetch_assoc($result)) {
         array_push($tarefas, $linha);
     }
     $conexao->closeConexao();
     return $tarefas;
 }
開發者ID:RaelCappra,項目名稱:SisTutor,代碼行數:13,代碼來源:CursoDao.php

示例5: listByTutor

 function listByTutor($tutor)
 {
     $conexao = new Conexao();
     $tutor_disciplina = "sistutor.tutor_disciplina";
     $dbCon = $conexao->getConexao();
     //criar join com curso
     $sql = "select id_disciplina as disciplina from {$tutor_disciplina} where id_tutor=\$1";
     $result = pg_query_params($dbCon, $sql, array($tutor->getTutorId()));
     $disciplinas = array();
     while ($linha = pg_fetch_assoc($result)) {
         $id = $linha['disciplina'];
         $disciplina = $this->getById($id);
         array_push($disciplinas, $disciplina);
     }
     $conexao->closeConexao();
     return $disciplinas;
 }
開發者ID:RaelCappra,項目名稱:SisTutor,代碼行數:17,代碼來源:DisciplinaDao.php

示例6: insere

 function insere($tarefa)
 {
     $conexao = new Conexao();
     $dbCon = $conexao->getConexao();
     if ($tarefa->getDataHora() != "") {
         $sql = "insert into tarefa(nome,descricao,data_hora, cor, imagem) values('" . $tarefa->getNome() . "','" . $tarefa->getDescricao() . "','" . $tarefa->getDataHora() . "','" . $tarefa->getCor() . "','" . $tarefa->getImagem() . "') ";
     } else {
         $sql = "insert into tarefa(nome,descricao, cor, imagem) values('" . $tarefa->getNome() . "','" . $tarefa->getDescricao() . "','" . $tarefa->getCor() . "','" . $tarefa->getImagem() . "') ";
     }
     pg_query($dbCon, $sql);
     $conexao->closeConexao();
 }
開發者ID:RaelCappra,項目名稱:SisTutor,代碼行數:12,代碼來源:TarefaDao.php

示例7: addTutorDisciplina

 function addTutorDisciplina($id_tutor, $id_disciplina)
 {
     $conexao = new Conexao();
     $tutor_disciplina = "sistutor.tutor_disciplina";
     $dbCon = $conexao->getConexao();
     $sql = "insert into {$tutor_disciplina} (id_tutor, id_disciplina, dt_inicio) values " . " (\$1, \$2, now())";
     pg_query_params($dbCon, $sql, array($id_tutor, $id_disciplina));
     $conexao->closeConexao();
 }
開發者ID:RaelCappra,項目名稱:SisTutor,代碼行數:9,代碼來源:TutorDao.php


注:本文中的Conexao::closeConexao方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。