您的位置:首页 > 服装鞋帽 > 男装 > 2011年01月11日

2011年01月11日

luyued 发布于 2011-03-08 12:45   浏览 N 次  

时尚在线分页分类存储过程

Use fs99

Go

ALTER PROC storyshow

@b_brandsort int, --声明数据分类

@tPageCount int OUTPUT, --输出参数,总页数

@tPageSize int, --每页显示多少条记录

@tPageNo int --当前页码

AS

SET NOCOUNT ON

BEGIN

/*取得总记录条数*/

DECLARE @tRecordCount int --总记录条数

SELECT @tRecordCount=COUNT(b_id) FROM tab_brandshow

/*确定总的页数*/

IF (@tRecordCount % @tPageSize) = 0

SET @tPageCount=CEILING(@tRecordCount/@tPageSize)
ELSE

SET @tPageCount=CEILING(@tRecordCount/@tPageSize)+1

/*如果输入的页码大于总的页数*/

IF @tPageNo > @tPageCount

SET @tPageNo = @tPageCount

/*确定当前页记录的起止标记*/

DECLARE @tStart int , @tEnd int --设置起止标志

SET @tStart=(@tPageNo-1) * @tPageSize

SET @tEnd =@tStart+@tPageSize+1

/*由其止标记得到当前页的记录*/
DECLARE @nsql VARCHAR(400)
set @nsql='select top '+STR(@tPageSize)+' * from tab_brandshow WHERE b_id NOT IN( SELECT TOP '+STR(@tStart)+' b_id FROM tab_brandshow where b_ispass='+STR(@b_brandsort)+' ORDER BY b_id desc) and b_ispass='+STR(@b_brandsort)+' ORDER BY b_id desc'
EXEC(@nsql)
/*我们把总记录做为返回值,这样存储过程就变了有返回值,输出参数和记录集了*/

RETURN @tRecordCount --做为返回值


END

pages模块:

=-------------------------

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>






休闲<a href='http://fz.okpinpai.net/' target='_blank'><span style='color:red'><u>服装</u></span></a>_时尚<a href='http://www.okpinpai.net/' target='_blank'><span style='color:red'><u>品牌</u></span></a>_中国时尚在线













http://www.chinasszx.com">首页 | http://business.chinasszx.com" style="color:red">商业动态 | http://www.chinasszx.com/member/user_logok_default.asp">商务中心 | http://www.chinasszx.com/blank/">百货商城 | http://www.chinasszx.com/fashion/">服饰潮流 | http://www.chinasszx.com/qiyefair.html">企业频道




中国时尚在线


http://www.chinasszx.com/"> alt="中国时尚在线" src="http://www.chinasszx.com/2010images/logo.png" width="218" height="77" />




  • http://business.chinasszx.com/brands/index.html">品牌

  • http://business.chinasszx.com/brands/list/list_63.html">家居

  • http://business.chinasszx.com/brands/list/list_65.html">皮具

  • http://business.chinasszx.com/brands/list/list_57.html">男装

  • http://business.chinasszx.com/brands/list/list_58.html">女装

  • http://business.chinasszx.com/brands/list/list_59.html">童装


  • http://business.chinasszx.com/brands/list/list_61.html">休闲

  • http://business.chinasszx.com/brands/list/list_62.html">内衣

  • http://business.chinasszx.com/brands/list/list_66.html">鞋业

  • http://business.chinasszx.com/brands/list/list_68.html">珠宝

  • http://business.chinasszx.com/brands/list/list_69.html">饰品

  • http://business.chinasszx.com/brands/list/list_70.html">化妆





  • http://www.chinasszx.com/fashion/Article/">风尚

  • http://www.chinasszx.com/fashion/News/">服饰

  • http://www.chinasszx.com/fashion/vSp/">奢品

  • http://www.chinasszx.com/fashion/vTk/">图库




  • http://www.chinasszx.com/fashion/vMr/">美容

  • http://www.chinasszx.com/fashion/vXx/">休闲

  • http://www.chinasszx.com/fashion/vXn/">型男

  • http://www.chinasszx.com/fashion/Article/list/list_113.html">快讯






  • http://www.chinasszx.com/n/">时尚新闻

  • http://www.chinasszx.com/brand/">时尚品牌

  • http://www.chinasszx.com/bizinfo.html">在线商机



  • http://www.chinasszx.com/company.html">在线企业

  • http://www.chinasszx.com/alliance.html">招商加盟

  • http://www.chinasszx.com/fair.html">时尚展会






全站搜索:


  • 标题

















时尚品牌







  • 供应

  • 企业

  • 样品

  • 品牌

  • 资讯






























广告赞助商