<?
$n=0;
$query=mysql_query("select count(*) as sm from $book_table ");
$row=mysql_fetch_array($query);
$count=$row[sm];
if(empty($offset))
{$offset=0;}/////// 在这里检查 $offset 的值
$query=mysql_query("select * from $book_table order by book_id desc limit $offset,$list_num") or die ("fail");
.....
$n=0;
$query=mysql_query("select count(*) as sm from $book_table ");
$row=mysql_fetch_array($query);
$count=$row[sm];
if(empty($offset))
{$offset=0;}/////// 在这里检查 $offset 的值
$query=mysql_query("select * from $book_table order by book_id desc limit $offset,$list_num") or die ("fail");
.....
解决方案 »
- PHP5.3.8 与 SQLite3 :could not find driver
- curl表单提交跨域问题
- http://www.phpchina.com/html/35/64535-32422.html 和 http://hi.baidu.com/riverbend/blog/item/49a7224c6c8399fbd72afc8a.html的 functi
- apache不支持PHP
- 中文简体和繁体的问题.
- *** 问题1: 打开一个页面时, 如何直接将url参数的页面地址 target 到mainFrame框架??? ***
- echo <<<EOD EOD 什么意思?
- 50分,请教:win2k下, apache 3.2.6+php 4.0.6安装后,php程序无法取得post和get的数据,为何?
- 如何用php做一个对文章进行全文搜索的程序
- 小菜鸟急求解决一个简单的访问权限问题
- 有关phpmyadmin
- 登陆 问题!
下面的$newoffset=$offset+$list_num;时,
$offset不是为20了吗?为什么不能跳到下一页
是不是程序又执行了 if(empty($offset))
{$offset=0;}
使值又变为0 呢??
那又如何改呢?
$offset=$_GET['offset'];
else
$offset=0;