Simple implementation of previous page and next page
手机用户105971037
手机用户105971037 2019-12-16 15:52:53
0
0
1257
     $front=db('archives')->where("id>".$aid)->order('id asc')->limit('1')->find();//上一页        $this->assign('front',$front);//上一页
        $after=db('archives')->where("id<".$aid)->order('id desc')->limit('1')->find();//下一页        $this->assign('after',$after);//下一页
<div class="point">             <p>上一篇:<a href="{:url('Article/index',array('aid'=>$front['id']))}">{$front['title']}</a></p>            <p>下一篇:<a href="{:url('Article/index',array('aid'=>$after['id']))}">{$after['title']}</a></p> </div>

How to write this when there is no information:www.hbsjsd.cn

手机用户105971037
手机用户105971037

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template