本文整理匯總了PHP中paging::getStartRecord方法的典型用法代碼示例。如果您正苦於以下問題:PHP paging::getStartRecord方法的具體用法?PHP paging::getStartRecord怎麽用?PHP paging::getStartRecord使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類paging
的用法示例。
在下文中一共展示了paging::getStartRecord方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unset
case "fields":
unset($_SESSION['searchForm']['fields']);
$_SESSION['searchForm']['allFields'] = true;
break;
}
$mediaPages->setCurrentPage(1);
unset($_SESSION['searchForm']['resultsArray']);
// Clear previous resultsArray
}
if ($page) {
$mediaPages->setCurrentPage($page);
} else {
$mediaPages->setCurrentPage($_SESSION['searchCurrentPage']);
}
// Use session current page
$mediaStartRecord = $mediaPages->getStartRecord();
// Get the record the db should start at
//echo "{$mediaStartRecord},{$mediaPerPage} - ".$_SESSION['mediaCurrentPage'];
//$mediaStartRecord = 0;
if ($_REQUEST['searchSortBy']) {
$_SESSION['searchForm']['searchSortBy'] = $_REQUEST['searchSortBy'];
}
if ($_REQUEST['searchSortType']) {
$_SESSION['searchForm']['searchSortType'] = $_REQUEST['searchSortType'];
}
if (!$_SESSION['searchForm']['searchSortBy']) {
$_SESSION['searchForm']['searchSortBy'] = 'date_added';
}
if (!$_SESSION['searchForm']['searchSortType']) {
switch ($_SESSION['searchForm']['searchSortType']) {
default:
示例2: header
} else {
$mediaPages->setCurrentPage($_SESSION['mediaCurrentPage']);
}
// Use session current page
if ($gpage) {
if (!is_numeric($gpage)) {
header("location: error.php?eType=invalidQuery");
exit;
}
$galleryPages->setCurrentPage($gpage);
// Set new current gallery page
} else {
$galleryPages->setCurrentPage($_SESSION['galleryCurrentPage']);
}
// Use session current page
$galleryStartRecord = $galleryPages->getStartRecord();
// Get the record the db should start at
$mediaStartRecord = $mediaPages->getStartRecord();
// Get the record the db should start at
$smarty->assign('galleryMode', $_SESSION['currentMode']);
// Assign the gallery mode to smarty
switch ($_SESSION['currentMode']) {
default:
$templateFile = 'noaccess.tpl';
// No permissions - send to noaccess page
break;
/*
* Gallery
*/
/*
* Gallery