當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataAccess::SetSetting方法代碼示例

本文整理匯總了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);
}
開發者ID:andopor,項目名稱:doma-project,代碼行數:29,代碼來源:db_scripts.php

示例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);
}
開發者ID:andopor,項目名稱:doma-project,代碼行數:31,代碼來源:ajax_server.php


注:本文中的DataAccess::SetSetting方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。