本文整理匯總了PHP中DataAccess::SetSetting方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataAccess::SetSetting方法的具體用法?PHP DataAccess::SetSetting怎麽用?PHP DataAccess::SetSetting使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DataAccess
的用法示例。
在下文中一共展示了DataAccess::SetSetting方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executeDatabaseScripts
function executeDatabaseScripts()
{
$allScripts = getScripts();
$errors = array();
foreach ($allScripts as $s) {
// check whether scripts should be run
if (isset($s["conditionFunction"])) {
$f = $s["conditionFunction"];
$runScripts = $f($s["conditionData"]);
} else {
$runScripts = true;
}
if ($runScripts) {
foreach ($s["scripts"] as $script) {
mysql_query($script);
Helper::WriteToLog($script);
$error = getMySQLErrorIfAny();
if ($error) {
Helper::WriteToLog($error);
$errors[] = $error;
}
}
}
}
if (count($errors) == 0) {
DataAccess::SetSetting("DATABASE_VERSION", DOMA_VERSION);
}
return array("errors" => $errors);
}
示例2: time
if (isset($_GET["rerunid"]) && is_numeric($_GET["rerunid"])) {
$rerunid = $_GET["rerunid"];
$map->RerunID = $rerunid;
if ($rerunid == 0) {
$map->RerunTries = RERUN_MAX_TRIES;
//map is not geocoded - avoid to send request again
} else {
$map->RerunTries = 0;
}
$map->Save();
}
}
}
}
}
}
break;
case "saveLastRerunCheck":
if (USE_3DRERUN == "1" && DataAccess::GetSetting("LAST_WORLDOFO_CHECK_DOMA_TIME", "0") + RERUN_FREQUENCY * 3600 < time()) {
DataAccess::SetSetting("LAST_WORLDOFO_CHECK_DOMA_TIME", time());
}
break;
}
function getMapCornerPositionsAndRouteCoordinates($id)
{
$map = new Map();
$map->Load($id);
$user = DataAccess::GetUserByID($map->UserID);
$categories = DataAccess::GetCategoriesByUserID($user->ID);
return Helper::GetOverviewMapData($map, true, false, false, $categories);
}