本文整理匯總了PHP中DatabaseConnection::closeConnection方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseConnection::closeConnection方法的具體用法?PHP DatabaseConnection::closeConnection怎麽用?PHP DatabaseConnection::closeConnection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DatabaseConnection
的用法示例。
在下文中一共展示了DatabaseConnection::closeConnection方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: escapeStr
public static function escapeStr($value)
{
$link = DatabaseConnection::get();
$value = mysql_escape_string($value);
DatabaseConnection::closeConnection($link);
return $value;
}
示例2: catch
//echo "<pre>";
//print_r($ansData);
echo json_encode($ansData);
} else {
$DataAvailable = 'Not Available';
echo "NoResult";
}
} catch (Exception $e) {
// echo 'Exception :'.$e->getMessage();
}
}
// echo "</tbody></table>";
/* echo <<<endl
<div class="tab-pane" id="tab-add"> </div>
<div class="tab-pane" id="tab-edit"></div>
<div class="tab-pane" id="tab-pendingtask"> </div>
endl; */
$_SESSION['DataAvailable'] = $DataAvailable;
$_SESSION['totalRows'] = $NumberofRows;
$_SESSION['resultQuery'] = $resultQuery;
//print_r($displayColumns);
$_SESSION['columns'] = $displayColumns;
$db->closeConnection();
unset($_SESSION['type']);
} else {
echo 'problem';
//die("Select the type first");
}
//echo "<p style='color:grey'> Please Select your Category</p>";
//echo "Final Query : ".$resultQuery;
示例3: handleDatabaseError
private function handleDatabaseError($link)
{
$error = mysql_error($link);
DatabaseConnection::closeConnection($link);
throw new Exception("Erreur DB : [" . $error . "]");
}