Class _ PHP Tutorial for displaying Oracle database records on pages

Source: Internet
Author: User
Class of Oracle Database records displayed on pages. <? Php *************************************** * ***** TOracleViewPagev2.0 date: -9-23 display the Oracle database record class Update Date by page: 2000-10-19 add display TopRecor <? Php
/*************************************** ******
TOracleViewPagev 2.0
Date: 2000-9-23
Categories of Oracle Database records displayed on pages

Updated on: 2000-10-19
Added the TopRecord display function, allowing the number of records displayed on the first page to be different from those displayed on other pages.
 
Author: sharetop
Email: ycshowtop@21cn.com
**************************************** *******/
Class TOracleViewPage {
Var $ Table; // Table name
Var $ MaxLine; // number of lines per page
Var $ LinkId; // Database Connection number
Var $ Id; // sorting reference field
Var $ Offset; // record Offset
Var $ Total; // The Total number of records.
Var $ Number; // Number of records read on the current page
Var $ TopNumber; // number of records actually retrieved when reading a new record
Var $ Result; // read the Result
Var $ TopResult; // the result when the new record is read.
Var $ TheFirstPage; // specify the link to the first page.
Var $ StartRec; // specify the start record number on the second page
Var $ TPages; // The total number of pages.
Var $ CPages; // Current page number
Var $ TGroup;
Var $ PGroup; // Number of page numbers displayed on each page
Var $ CGroup;
Var $ Condition; // display conditions such as: where id = '$ ID' order by id desc
Var $ PageQuery; // display the parameters to be passed by page
//-------------------------------------
// The following constructor, destructor, and initialization function
//-------------------------------------
// Constructor
// Parameter: table name, maximum number of rows, reference fields by page, number of page numbers displayed on each 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;
}
// Initialization
// Parameter: 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

Http://www.bkjia.com/PHPjc/631118.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/631118.htmlTechArticle? Php /************************************** * ****** TOracleViewPagev 2.0 date: -9-23 display the Oracle database record class Update Date on pages: 2000-10-19 added Display TopRecor...

Contact Us

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.

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.