仙剑四昆吾砂:asp问题急问大家!

来源:百度文库 编辑:高考问答 时间:2024/05/09 13:51:15
'=================================================
'过程名:ShowArticle_1
'作 用:分页显示文章标题等信息
'参 数:TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowArticle_1(TitleLen)
if TitleLen<0 or TitleLen>200 then
TitleLen=50
end if
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
sqlArticle="select top " & MaxPerPage
else
sqlArticle="select "
end if

sqlArticle=sqlArticle & " ArticleID,BigClassName,SmallClassName,IncludePic,Title,UpdateTime,Hits,Author,OnTop,Hot,Elite from article where Passed=True "

if BigClassName=<>"" then
sqlArticle=sqlArticle & " and BigClassName='" & BigClassName & "' "
if SmallClassName<>"" then
sqlArticle=sqlArticle & " and SmallClassName='" & SmallClassName & "' "
end if
else
if SpecialName<>"" then
sqlArticle=sqlArticle & " and SpecialName='" & SpecialName & "' "
end if
end if
sqlArticle=sqlArticle & " order by OnTop,articleid desc"
Set rsArticle= Server.CreateObject("ADODB.Recordset")
rsArticle.open sqlArticle,conn,1,1
if rsArticle.bof and rsArticle.eof then
response.Write("<br><li>没有任何文章</li>")
else
if currentPage=1 then
call ArticleContent(TitleLen)
else
if (currentPage-1)*MaxPerPage<totalPut then
rsArticle.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsArticle.bookmark
call ArticleContent(TitleLen)
else
currentPage=1
call ArticleContent(TitleLen)
end if
end if
end if
rsArticle.close
set rsArticle=nothing
end sub

请问如何才能把这个过程的BigClassName固定??

急啊!

高手指教!
不好意思,说的不是很清楚,目前这个过程是显示全部文章,我的目的是只显示BigClassName中特定的一个!

if BigClassName=<>"" then
sqlArticle=sqlArticle & " and BigClassName='" & BigClassName & "' "
把这个去掉 换成
BigClassName="固定值"
显示文章主要是在这个过程里
call ArticleContent(TitleLen)
把它发上来看看

BigClassName固定 具体指什么?解释清楚一下