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