本文整理匯總了PHP中DB_Functions::getDataVersion方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB_Functions::getDataVersion方法的具體用法?PHP DB_Functions::getDataVersion怎麽用?PHP DB_Functions::getDataVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::getDataVersion方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
if (!isset($_SESSION)) {
session_start();
}
if (!isset($_SESSION["email"]) || !isset($_SESSION["registration"])) {
http_response_code(403);
// forbidden
die;
}
include_once '../db_functions.php';
$db = new DB_Functions();
$regId = $_SESSION["registration"];
$rowid = $_SESSION["rowid"];
$dataVersion = $db->getDataVersion($regId, $rowid);
$mdVersion = $db->getMDVersion($regId, $rowid);
if ($mdVersion != $dataVersion) {
$db->clearDeviceData($regId);
$db->setDataVersion($regId, $mdVersion);
echo $mdVersion . " Updated";
} else {
echo $mdVersion;
}
示例2: refreshAll
});
</script>
<li role="presentation"><a role="menuitem" style="cursor:pointer" tabindex="-1" id="SD_<?php
echo $rowid;
?>
"><?php
echo $name;
?>
</a></li>
<?php
}
if (!isset($_SESSION['registration'])) {
$_SESSION["registration"] = $registration;
$_SESSION["name"] = $name;
$_SESSION["rowid"] = $rowid;
$deviceDataVersion = $db->getDataVersion($registration, $rowid);
?>
<script type="text/javascript">
$(document).ready(function(){
$("#device-choice-dropdown-txt").text("<?php
echo $name;
?>
");
if (Cookies.get('options_autoRefreshPages') != "false") {
refreshAll("<?php
echo $registration;
?>
");
}
});
</script>