ASP更改页面产品数量

[复制链接]
查看11 | 回复2 | 2010-5-31 11:18:07 | 显示全部楼层 |阅读模式
代码如下
[TR]





下面是过程代码:
sub ShowProduct(TitleLen)
if TitleLen200 then
TitleLen=50
end if

if currentpagetotalput then
if (totalPut mod MaxPerPage)=0 then

currentpage= totalPut \ MaxPerPage
else

currentpage= totalPut \ MaxPerPage + 1
end if

end if
if currentPage=1 then

sqlProduct="select top " & MaxPerPage
else
sqlProduct="select "
end if
sqlProduct=sqlProduct & " ID,Product_Id,BigClassName,SmallClassName,IncludePic,Title,Price,Spec,Unit,Memo,DefaultPicUrl,UpdateTime,Hits from Product where Passed=True "

if BigClassName"" then
sqlProduct=sqlProduct & " and BigClassName='" & BigClassName & "' "
if SmallClassName"" then
sqlProduct=sqlProduct & " and SmallClassName='" & SmallClassName & "' "
end if
end if
sqlProduct=sqlProduct & " order by UpdateTime desc"
Set rsProduct= Server.CreateObject("ADODB.Recordset")
rsProduct.open sqlProduct,conn,1,1
if rsProduct.bof andrsProduct.eof then
response.Write("
  • 没有任何产品")
    else
    if currentPage=1 then
    call ProductContent(TitleLen)
    else
    if (currentPage-1)*MaxPerPage<totalPut then

    rsProduct.move(currentPage-1)*MaxPerPage

    dim bookmark

    bookmark=rsProduct.bookmark

    call ProductContent(TitleLen)

    else

    currentPage=1

    call ProductContent(TitleLen)

    end if
    end if
    end if
    rsProduct.close
    set rsProduct=nothing
    end sub

  • 回复

    使用道具 举报

    千问 | 2010-5-31 11:18:07 | 显示全部楼层
    MaxPerPage这个还没赋值呢!!!
    回复

    使用道具 举报

    千问 | 2010-5-31 11:18:07 | 显示全部楼层
    sqlProduct="select top " & MaxPerPage 这句改下 sqlProduct="select top MaxPerPage"
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    主题

    0

    回帖

    4882万

    积分

    论坛元老

    Rank: 8Rank: 8

    积分
    48824836
    热门排行