思路:
你指定一个ID(当前的,比如是10) 
 上一页就是比10小而且是最大的。只要你去获取比10小而且是最大的。
下一页就是比10大的,而且是最小的。求代码支持 请各位大侠帮帮忙

解决方案 »

  1.   

    select id from table where id>当前ID limit 0,1;
    select id from table where id<当前ID limit 0,1;
      

  2.   

    求各位大侠最好用php代码写出比当前ID小而且是最大的 并且 比当前ID大的而且是最小的
      

  3.   

    select id from table where id>当前ID order by id asc limit 1;   //下一条
    select id from table where id<当前ID order by id desc limit 1;  //下一条接下来就很简单了吧。