当前位置: 首页>>代码示例>>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;未经允许,请勿转载。