本文整理汇总了PHP中Logging::log_fetch_highest_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Logging::log_fetch_highest_id方法的具体用法?PHP Logging::log_fetch_highest_id怎么用?PHP Logging::log_fetch_highest_id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logging
的用法示例。
在下文中一共展示了Logging::log_fetch_highest_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _
<th colspan="2"><?php
print _('Event');
?>
</th>
</tr>
<!-- print logs -->
<?php
//fetch 40 logs at once
$logCount = 40;
//set severity queries
$_POST['InformationalQuery'] = @$_POST['Informational'] == _("Informational") ? 0 : 10;
$_POST['NoticeQuery'] = @$_POST['Notice'] == _("Notice") ? 1 : 10;
$_POST['WarningQuery'] = @$_POST['Warning'] == _("Warning") ? 1 : 10;
//get highest lastId */
$highestId = $Log->log_fetch_highest_id();
if (empty($_POST['lastId']) || $_POST['lastId'] == "undefined") {
$_POST['lastId'] = $highestId;
}
//set empty direction
if (!isset($_POST['direction'])) {
$_POST['direction'] = "";
}
/* get requested logs */
$logs = $Log->fetch_logs($logCount, $_POST['direction'], $_POST['lastId'], $highestId, $_POST['InformationalQuery'], $_POST['NoticeQuery'], $_POST['WarningQuery']);
$x = 0;
foreach ($logs as $log) {
//cast
$log = (array) $log;
if ($x < $logCount) {
//set classes based on severity