当前位置: 首页>>代码示例>>PHP>>正文


PHP db_pageseek函数代码示例

本文整理汇总了PHP中db_pageseek函数的典型用法代码示例。如果您正苦于以下问题:PHP db_pageseek函数的具体用法?PHP db_pageseek怎么用?PHP db_pageseek使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了db_pageseek函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AddTop

         }
         if (!$mypage) {
             $mypage = 1;
         }
         $strSQL = AddTop($strSQL, $mypage * $nPageSize);
     }
 }
 $listarray = false;
 if ($eventObj->exists("ListQuery")) {
     $listarray = $eventObj->ListQuery($pageObject->searchClauseObj, $_SESSION[$strTableName . "_arrFieldForSort"], $_SESSION[$strTableName . "_arrHowFieldSort"], $_SESSION[$strTableName . "_mastertable"], $masterKeysReq, $selected_recs, $nPageSize, $mypage);
 }
 if ($listarray !== false) {
     $rs = $listarray;
 } elseif ($nPageSize > 0) {
     $rs = db_query($strSQL, $conn);
     db_pageseek($rs, $nPageSize, $mypage);
 } else {
     $rs = db_query($strSQL, $conn);
 }
 if (!ini_get("safe_mode")) {
     set_time_limit(300);
 }
 if (substr(@$_REQUEST["type"], 0, 5) == "excel") {
     //	remove grouping
     $locale_info["LOCALE_SGROUPING"] = "0";
     $locale_info["LOCALE_SMONGROUPING"] = "0";
     ExportToExcel();
 } else {
     if (@$_REQUEST["type"] == "word") {
         ExportToWord();
     } else {
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:31,代码来源:Anomalies_export.php

示例2: seekPageInRecSet

 /**
  * Seeks recs, depending on page number etc.
  *
  * @param string $strSQL
  */
 function seekPageInRecSet($strSQL)
 {
     $listarray = false;
     if ($this->eventExists("ListQuery")) {
         $arrFieldForSort = array();
         $arrHowFieldSort = array();
         for ($i = 0; $i < count($this->orderClause->fieldsList); $i++) {
             $arrFieldForSort[] = $this->orderClause->fieldsList[$i]->fieldIndex;
             $arrHowFieldSort[] = $this->orderClause->fieldsList[$i]->orderDirection;
         }
         $listarray = $this->eventsObject->ListQuery($this->searchClauseObj, $arrFieldForSort, $arrHowFieldSort, $this->masterTable, $this->masterKeysReq, null, $this->pageSize, $this->myPage, $this);
     }
     if ($listarray !== false) {
         $this->recSet = $listarray;
     } else {
         if ($this->dbType == nDATABASE_MySQL) {
             if ($this->maxPages > 1) {
                 $strSQL .= " limit " . ($this->myPage - 1) * $this->pageSize . "," . $this->pageSize;
             }
             $this->recSet = db_query($strSQL, $this->conn);
         } elseif ($this->dbType == nDATABASE_MSSQLServer) {
             if ($this->maxPages > 1) {
                 $strSQL = AddTop($strSQL, $this->myPage * $this->pageSize);
             }
             $this->recSet = db_query($strSQL, $this->conn);
             db_pageseek($this->recSet, $this->pageSize, $this->myPage);
         } elseif ($this->dbType == nDATABASE_Access) {
             if ($this->maxPages > 1) {
                 $strSQL = AddTop($strSQL, $this->myPage * $this->pageSize);
             }
             $this->recSet = db_query($strSQL, $this->conn);
             db_pageseek($this->recSet, $this->pageSize, $this->myPage);
         } elseif ($this->dbType == nDATABASE_Oracle) {
             if ($this->maxPages > 1) {
                 $strSQL = AddRowNumber($strSQL, $this->myPage * $this->pageSize);
             }
             $this->recSet = db_query($strSQL, $this->conn);
             db_pageseek($this->recSet, $this->pageSize, $this->myPage);
         } elseif ($this->dbType == nDATABASE_PostgreSQL) {
             if ($this->maxPages > 1) {
                 $maxrecs = $this->pageSize;
                 $strSQL .= " limit " . $this->pageSize . " offset " . ($this->myPage - 1) * $this->pageSize;
             }
             $this->recSet = db_query($strSQL, $this->conn);
         } elseif ($this->dbType == nDATABASE_DB2) {
             if ($this->maxPages > 1) {
                 $strSQL = "with DB2_QUERY as (" . $strSQL . ") select * from DB2_QUERY where DB2_ROW_NUMBER between " . (($this->myPage - 1) * $this->pageSize + 1) . " and " . $this->myPage * $this->pageSize;
             }
             $this->recSet = db_query($strSQL, $this->conn);
         } elseif ($this->dbType == nDATABASE_Informix) {
             if ($this->maxPages > 1) {
                 $strSQL = AddTopIfx($strSQL, $this->myPage * $this->pageSize);
             }
             $this->recSet = db_query($strSQL, $this->conn);
             db_pageseek($this->recSet, $this->pageSize, $this->myPage);
         } elseif ($this->dbType == nDATABASE_SQLite3) {
             if ($this->maxPages > 1) {
                 $strSQL .= " limit " . ($this->myPage - 1) * $this->pageSize . "," . $this->pageSize;
             }
             $this->recSet = db_query($strSQL, $this->conn);
         } else {
             $this->recSet = db_query($strSQL, $this->conn);
             db_pageseek($this->recSet, $this->pageSize, $this->myPage);
         }
     }
 }
开发者ID:aagusti,项目名称:padl-tng,代码行数:71,代码来源:listpage.php


注:本文中的db_pageseek函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。