正点的定义是什么?我写过好多分页的程序了,每次都是因为把以前的忘了。也不知道哪个正点一些。

解决方案 »

  1.   

    献丑了。$sql->Query("select acticle_id from acticle where item_id='$item_id'");
    $all_rows=$sql->rows;//所有条数$sql->Query("select acticle_id,acticle_topic,acticle_time from acticle where item_id='$item_id' order by acticle_mid limit $offset,$perpage");//limit 开始位置,向后多少条
    $rows=$sql->rows;//当前页条数$all_page=ceil($all_rows/$perpage);//共多少页
    $now_page=ceil($offset/$perpage)+1;//当前页
    $last_offset=$offset-$perpage;
    if ($last_offset<=0) $last_offset=$offset;//上一页
    $next_offset=$offset+$perpage;
    if ($next_offset>=$all_rows) $next_offset=$offset;//下一页
    $finish_offset=($all_page-1)*$perpage;//最后一页
      

  2.   

    这个不错,我也是用这个的。
      

  3.   

    坚决打击这种吃饭不给钱的家伙!!