本文整理汇总了PHP中Reports::search_counter方法的典型用法代码示例。如果您正苦于以下问题:PHP Reports::search_counter方法的具体用法?PHP Reports::search_counter怎么用?PHP Reports::search_counter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reports
的用法示例。
在下文中一共展示了Reports::search_counter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Reports
//page end is actually the range to show 5 rec, 10 recs, etc.
$page_end = $_REQUEST['page_end'];
} else {
$page_end = "10";
}
if (!empty($_REQUEST['client_id'])) {
$keyword = $_REQUEST['client_id'];
$field = 'client_id';
} else {
$client_id = "";
}
$r = new Reports('unknown', BASE_DOMAIN);
if (!empty($_REQUEST['keyword'])) {
$reports = $r->search($keyword, $field, $page_start, $page_end);
//returns paged results
$reports_count = $r->search_counter($keyword, $field);
//get search result count
echo "<b>Result(s): " . $reports_count . "</b><br /><hr>";
} elseif (!empty($_REQUEST['uid'])) {
//get one report from search results
$uid = $_REQUEST['uid'];
$reports = $r->getReport($uid);
} else {
echo "Sorry, No Results Found <br /><br />";
die;
}
$pager_count = $reports_count;
//total records for query
$pager_range = count($reports);
//total currently displayed
$pager_end = $page_start + $pager_range;