本文整理匯總了PHP中Conexao::desconectar方法的典型用法代碼示例。如果您正苦於以下問題:PHP Conexao::desconectar方法的具體用法?PHP Conexao::desconectar怎麽用?PHP Conexao::desconectar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Conexao
的用法示例。
在下文中一共展示了Conexao::desconectar方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executaSQL
public function executaSQL($_prStringSQL = '', $SQL = false, Sql $_prTransacao = null)
{
unset($this->StlRETORNO);
if ($_prStringSQL == '') {
$_prStringSQL = $this->StringSQL;
}
if ($this->LIMITFINAL > 0) {
$_prStringSQL .= " LIMIT {$this->LIMITINICI}, {$this->LIMITFINAL}";
}
$this->StringSQL = $_prStringSQL;
$temTransacao = false;
if ($_prTransacao != null) {
$this->PRSCONEXAO = $_prTransacao->PRSCONEXAO;
} else {
if ($this->PRSCONEXAO == null) {
$conexao = new Conexao();
$conexao->conectar();
$this->PRSCONEXAO = $conexao->getConexao();
$temTransacao = true;
}
}
gravaLog($_prStringSQL);
if ($SQL) {
$retorno = @mysqli_query($this->PRSCONEXAO, $_prStringSQL);
return $retorno;
} else {
$Aux = @mysqli_query($this->PRSCONEXAO, $_prStringSQL);
for ($i = 0; $i < @mysqli_num_rows($Aux); $i++) {
$this->StlRETORNO[$i] = @mysqli_fetch_assoc($Aux);
}
return arrayUtf8Enconde($this->StlRETORNO);
}
if ($temTransacao) {
$conexao->desconectar();
}
}
示例2: __destruct
function __destruct()
{
Conexao::desconectar();
}