分頁顯示Oracle資料庫記錄的類

來源:互聯網
上載者:User
<?php
/*********************************************
TOracleViewPagev 2.0
日期:2000-9-23
分頁顯示Oracle資料庫記錄的類

更新日期:2000-10-19
增加顯示TopRecord的功能,允許第一頁顯示的記錄數與其它頁不同。
 
作者:sharetop
email:ycshowtop@21cn.com
***********************************************/
class TOracleViewPage {
var $Table; //表名
var $MaxLine; //每頁顯示行數
var $LinkId; //資料庫連接號
var $Id; //排序參考欄位
var $Offset; //記錄位移量
var $Total; //記錄總數
var $Number; //本頁讀取的記錄數
var $TopNumber;//讀新記錄時實際取出的記錄數
var $Result; //讀出的結果
var $TopResult;//讀新記錄時的結果
var $TheFirstPage;//特殊指定第一頁的連結
var $StartRec; //指定第二頁的起始記錄號
var $TPages; //總頁數
var $CPages; //當前頁數
var $TGroup;
var $PGroup; //每頁顯示的頁號個數
var $CGroup;
var $Condition; //顯示條件 如:where id='$id' order by id desc
var $PageQuery; //分頁顯示要傳遞的參數
//-------------------------------------
// 以下建構函式、解構函式及初始化函數
//-------------------------------------
//建構函式
//參數:表名、最大行數、分頁參考的欄位、每頁顯示的頁號數
function TOracleViewPage($TB,$ML,$id){
global $offset;
$this->Table=$TB;
$this->MaxLine=$ML;
$this->Id=$id;
$this->StartRec=0;
if(isset($offset)) $this->Offset=$offset;
else $this->Offset=0;
$this->Condition="";
$this->TheFirstPage=NULL;
$this->PageQury=NULL;
}
//初始化
//參數:使用者名稱、密碼、資料庫
function InitDB($user,$password,$db){
if (PHP_OS == "WINNT") $dllid=dl("php3_oci80.dll");
$this->LinkId = OCILogon($user,$password,$db);
}
//斷開
function Destroy(){
OCILogoff($this->LinkId);
}
//-------------------------
// Set 函數

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.