php与Microsoft SQL Server

 

sql server下分页的处理:

由于sql server 没有limit 关键字,但有替代的关键字top,

   查询第X页,每页Y条记录   
    
  最基本的处理方法:   
    
  如果表中有主键(记录不重复的字段也可以),可以用类似下面的方法,当然y,(x-1)*y要换成具体的数字,不能用变量:   
    
  select   top   y   *   from   表   where   主键   not   in(select   top   (x-1)*y   主键   from   表)  

 

相关链接:

http://www.uncletoo.com/html/yii/797.html  //yii下使用

http://www.uncletoo.com/html/sqlserver/798.html  //wamp链接sqlserver

http://blog.csdn.net/xocom/article/details/45840725 //可以下载对应64位 .dll

http://blog.csdn.net/keyunq/article/details/1603339 //sql server分页

posted @ 2015-12-29 23:48  zyliang  阅读(223)  评论(0编辑  收藏  举报