相关文章  
  • 用 ASP编程来控制在IIS 建立Web站点
  • 用实例来说明如何优化Web数据库页面
  • 装IIS 6.0后所有站都出现500错误
  • 服务器端异步 Web 方法(二)
  • 服务器端异步 Web 方法(三)
  • IIS自动开通组件编程
  • 提高IIS网站服务器效率八法
  • 成功做好网络管理员 IIS使用十大原则
  • 在 WebForm 的 DadaGrid 中显示图象
  • Web 应用程序级别的 Cluster 实现技术
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    一种理论上最快的Web数据库分页方法2

    管他。。
      @int_pagenow int=0,
      @int_pagesize int=0,
      @int_recordcount int=0 output  --就是得出BBS某个版面的总贴数。。
      
      )
      
      AS
      set nocount on
      
      declare @int_allid int
      declare @int_beginid int,@int_endid int
      declare @int_pagebegin int, @int_pageend int
      
      select @int_allid=count(*) from tab_discuss where tint_level=0 and tint_tableid=@tint_tableid
      select @int_recordcount=@int_allid     --得出该版面的总贴数
      
      declare cro_fastread cursor scroll
      for  select int_id from tab_discuss where tint_level=0 and tint_tableid=@tint_tableid order by int_id desc --这里定义游标操作,但是不用临时纪录集,而且游标也不需要全部遍历所有纪录集。
      
      open cro_fastread --打开游标
      select @int_beginid=(@int_pagenow-1)*@int_pagesize+1 得出该页的第一个纪录Id
      select @int_endid = @int_beginid+@int_pag

    页码:[1] [2] [3] [4] [5] [6] [7] [8]2页、共8页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved