當前位置: 首頁>>代碼示例>>PHP>>正文


PHP paging::getStartRecord方法代碼示例

本文整理匯總了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:
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:search.bu.php

示例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
開發者ID:spencerlambert,項目名稱:willie-php,代碼行數:31,代碼來源:gallery.php


注:本文中的paging::getStartRecord方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。