ADODB类的分页功能的使用问题!!!!!急!!! 大虾们帮我看看为什么下面这段ADODB类的分页不能实现啊!!!出现的问题是不能输出"上一页"和"下一页"这两句代码啊!!!急!!!在线等! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 汗颜拉!Oh,Oh, where is my code? :-) 不好意思啊!!!代码如下!!!<?php //-----------------------------------是不是分页啊--------------------------------------------- include("opendata.php"); session_start(); session_register("curr_page"); $num_of_rows_per_page = 5; $sql="select * from news"; if(isset($_GET['next_page'])) { $curr_page=$_GET['next_page']; } if(empty($curr_page)) { $curr_page = 1; } $result = $db -> PageExecute($sql,$num_of_rows_per_page,$curr_page); if(!$result) die("page failed!!"); if(!$result -> EOF && (!$result -> AtFirstPage() || !$result -> AtLastPage())) { if(!$result -> AtFirstPage()) {?> <a href="<?php echo $PHP_SELF."?next_page=".$result -> AbsolutePage() -1 ?>">上一页</a><?php } if($result -> AtLastPage()) {?> <a href="<?php echo $PHP_SELF."?next_page=".$result -> AbsolutePage() +1 ?>">下一页</a><?php } rs2html($result); }?> 能不能查找数据库 条件是一个字段包含某一个数 并且不包含另外一个数 PHP 删除数组 打开注册页面 关于数组转换的问题,帮忙看看 我的一个表,如abc 求助:如何把submit放到form标签外面 require很多.html文件占用资源大吗 这个常量如何理解 配置apache+php 出错(急急急) 请问php中能否定义常驻内存中的变量? 谁能帮我把这段代PHP码改成ASP的 php中的copy()命令是否支持映射盘符?
代码如下!!!
<?php
//-----------------------------------是不是分页啊---------------------------------------------
include("opendata.php");
session_start();
session_register("curr_page");
$num_of_rows_per_page = 5;
$sql="select * from news";
if(isset($_GET['next_page']))
{
$curr_page=$_GET['next_page'];
}
if(empty($curr_page))
{
$curr_page = 1;
}
$result = $db -> PageExecute($sql,$num_of_rows_per_page,$curr_page);
if(!$result) die("page failed!!");
if(!$result -> EOF && (!$result -> AtFirstPage() || !$result -> AtLastPage()))
{
if(!$result -> AtFirstPage())
{
?>
<a href="<?php echo $PHP_SELF."?next_page=".$result -> AbsolutePage() -1 ?>">上一页</a>
<?php
}
if($result -> AtLastPage())
{
?>
<a href="<?php echo $PHP_SELF."?next_page=".$result -> AbsolutePage() +1 ?>">下一页</a>
<?php
}
rs2html($result);
}
?>