PHP头条
热点:

一个ORACLE分页程序


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Paging Test</TITLE>
<META NAME="Generator" CONTENT="TextPad 4.0">
<META NAME="Author" CONTENT="?">
<META NAME="Keywords" CONTENT="?">
<META NAME="Description" CONTENT="?">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
<?php
// How to split the result into pages, like 'limits' in MySQL?
// ===========================================================
// Tutorial by Neil Craig (neilc@netactive.co.za)
// Date: 2001-06-05
// With this example, I will explain paging of database queries where the
// result is more than the developer want to print to the page, but wish to
// split the result into seperate pages.
// The table "SAMPLE_TABLE" accessed in this tutorial has 4 fields:
// PK_ID, FIELD1, FIELD2 and FIELD3. The types don't matter but you should
// define a primary key on the PK_ID field.
$display_rows = 5; // The rows that should be display at a time. You can
// modify this if you like.
// Connect to the Oracle database
putenv("ORACLE_SID=purk");
putenv("ORACLE_HOME=/export/oracle8i");
putenv("TNS_ADMIN=$ORACLE_HOME/network/admin");
$OracleDBConn = OCILogon("purk","purk","lengana.world");
// This query counts the records
$sql_count = "SELECT COUNT(*) FROM SAMPLE_TABLE";
// Parse the SQL string & execute it
$row_count=OCIParse($OracleDBConn, $sql_count); OCIExecute($row_count);
// From the parsed & executed query, we get the amount of records found.

www.phpzy.comtrue/php/23713.htmlTechArticle一个ORACLE分页程序 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN HTML HEAD TITLEPaging Test/TITLE META NAME=Generator CONTENT=TextPad 4.0 META NAME=Author CONTENT=? META NAME=Keywords CONTENT=? META NAME=Description CONTENT=? /H...

相关文章

    暂无相关文章

PHP之友评论

今天推荐