<?php
/*********************************************
Toracleviewpagev 2.0
Date: 2000-9-23
Pagination displays classes for Oracle database records
Renew Date: 2000-10-19
Increases the ability to display Toprecord, allowing the first page to display a different number of records than other pages.
Author: sharetop
Email:ycshowtop@21cn.com
***********************************************/
Class Toracleviewpage {
var $Table; Table name
var $MaxLine; Show number of rows per page
var $LinkId; Database connection number
var $Id; Sort Reference Field
var $Offset; Record offset
var $Total; Total Records
var $Number; Number of records read on this page
The number of records actually taken out when a new record was read by Var $TopNumber;
var $Result; read out the results
var $TopResult//Results when reading a new record
var $TheFirstPage;//special Specifies the link for the first page
var $StartRec; Specify the starting record number for the second page
var $TPages; Total pages
var $CPages; Current page
var $TGroup;
var $PGroup; Number of page numbers displayed per page
var $CGroup;
var $Condition; Display criteria such as: where id= ' $id ' ORDER by id DESC
var $PageQuery; Pagination shows the parameters to pass
//-------------------------------------
The following constructors, destructors, and initialization functions
//-------------------------------------
Constructors
Parameters: Table name, maximum number of rows, paged Reference field, page number per page
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;
}
Class
Parameters: User name, password, database
function Initdb ($user, $password, $db) {
if (Php_os = = "WINNT") $dllid =dl ("Php3_oci80.dll");
$this->linkid = Ocilogon ($user, $password, $db);
}
Disconnect
function Destroy () {
Ocilogoff ($this->linkid);
}
//-------------------------
Set function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.