asp代码问题,,删除文章
删除记录时,下面两个if语句分别是什么情况?ifinstr(ArticleID,",")>0thenArticleID=replace(ArticleID,"","")s...
删除记录时,下面两个if语句分别是什么情况?
if instr(ArticleID,",")>0 then
ArticleID=replace(ArticleID," ","")
sqlDel="select ArticleID from TTArticle where ArticleID in (" & ArticleID & ")"
else
ArticleID=Clng(ArticleID)
sqlDel="select ArticleID from TTArticle where ArticleID=" & ArticleID
end if
Set rsDel= Server.CreateObject("ADODB.Recordset")
rsDel.open sqlDel,conn,1,3
do while not rsDel.eof
rsDel.Delete()
rsDel.Movenext
loop
rsDel.close
set rsDel=nothing
end sub 展开
if instr(ArticleID,",")>0 then
ArticleID=replace(ArticleID," ","")
sqlDel="select ArticleID from TTArticle where ArticleID in (" & ArticleID & ")"
else
ArticleID=Clng(ArticleID)
sqlDel="select ArticleID from TTArticle where ArticleID=" & ArticleID
end if
Set rsDel= Server.CreateObject("ADODB.Recordset")
rsDel.open sqlDel,conn,1,3
do while not rsDel.eof
rsDel.Delete()
rsDel.Movenext
loop
rsDel.close
set rsDel=nothing
end sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询