php+oracle 分页类
2008-05-01 03:57
295 查看
下面是分页示例程序,看起来可能比较繁琐,但其实你只要用一下就会发现,"一切原来如此简单" :)
example.php
<?php
$conn = ociplogon("test","123456","test123");
include_once "pager.inc.php";
?>
<?php
/** 分页测试开始 */
// {{{ 初始分页对象
$pager = new pager();
/** 将 select id,name,age from test where age>20 order by id desc 拆分 */
$sqlArr = array('conn' => $conn, // 数据库连结
'fields' => " id,name,age ", // 查询主语句
'table' => "test", // 表名
'condition' => " age>20 ", // 查询条件
'order' => " order by id desc " // 排序方式
);
if (!$pager->listn($sqlArr,10,$page)) // 每页显示10条
{
$pager->errno = 10;
die($pager->errmsg());
}
/
example.php
<?php
$conn = ociplogon("test","123456","test123");
include_once "pager.inc.php";
?>
<?php
/** 分页测试开始 */
// {{{ 初始分页对象
$pager = new pager();
/** 将 select id,name,age from test where age>20 order by id desc 拆分 */
$sqlArr = array('conn' => $conn, // 数据库连结
'fields' => " id,name,age ", // 查询主语句
'table' => "test", // 表名
'condition' => " age>20 ", // 查询条件
'order' => " order by id desc " // 排序方式
);
if (!$pager->listn($sqlArr,10,$page)) // 每页显示10条
{
$pager->errno = 10;
die($pager->errmsg());
}
/
相关文章推荐
- php oracle 分页类
- php+oracle 分页类
- php+oracle 分页类
- PHP分页类
- Linux下PHP开启Oracle支持(oci8)
- PHP5.3连接Oracle客户端及PDO_OCI模块的安装方法
- PHP操作Oracle数据
- php 分页类(1)
- customPage.class.php可添加js事件的分页类
- 快速好用的php分页类
- 为 Linux 和 Windows 安装 PHP 和 Oracle 10g Instant Client
- PHP + ORACLE 远程连接数据库环境配置
- 用PHP操纵Oracle的LOB类型的数据
- ORACLE中文排序及在table中指定位置增加字段本篇文章来源于:开发学院 http://edu.codepub.com 原文链接:http://edu.codepub.com/2009/0531/5086.php
- php分页类
- window平台下php连接Oracle
- php 操作 oracle lob 数据
- php分页类代码带分页样式效果(转)
- PHP(PHPstorm)+Apache+Oracle 安装与配置心得
- PHP分页代码 PHP分页类 PHP分页实例