本文整理汇总了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);
}