本文整理匯總了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;
}
}
示例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();
}
示例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);
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}