[求助]SQL
<%sql = "select *,ShowTime = convert(char(20),CreateDate,120) from TArticle where IfCommand = 'Y' and IfIssue = 'Y' and ArtType <> '004' order by CreateDate desc"
set rs = conn.execute(sql)
ShowTime = rs("ShowTime")
i = 0
do while not rs.eof and i<11
select case rs("ArtType")
case "000"
sql = "select * from TArticleInformation where ArticleId = '"+rs("ArticleId")+"'"
set rsInf = conn.execute(sql)
if not rsInf.eof then
sTitle = rsInf("Title")
Information = "标题:"+rsInf("Title")+" 作者:"+rsInf("Auther")+" 发布时间:"+ShowTime+" 点击率:"+cstr(rs("ClickNum"))
end if
rsInf.close
case "001"
sql = "select * from TLibrary where ArticleId = '"+rs("ArticleId")+"'"
set rsInf = conn.execute(sql)
if not rsInf.eof then
sTitle = rsInf("Title")
Information = "标题:"+rsInf("Title")+chr(13)+"作者:"+rsInf("Auther")+chr(13)+"发布时间:"+ShowTime+chr(13)+"点击率:"+cstr(rs("ClickNum"))
end if
rsInf.close
case "002"
sql = "select * from TCultural where ArticleId = '"+rs("ArticleId")+"'"
set rsInf = conn.execute(sql)
if not rsInf.eof then
sTitle = rsInf("Title")
Information = "标题:"+rsInf("Title")+chr(13)+"发布时间:"+ShowTime+chr(13)+"点击率:"+cstr(rs("ClickNum"))
end if
rsInf.close
case "003"
sql = "select * from TDynamic where ArticleId = '"+rs("ArticleId")+"'"
set rsInf = conn.execute(sql)
if not rsInf.eof then
sTitle = rsInf("Title")
Information = "标题:"+rsInf("Title")+chr(13)+"作者:"+rsInf("Auther")+chr(13)+"发布时间:"+ShowTime+chr(13)+"点击率:"+cstr(rs("ClickNum"))
end if
rsInf.close
end select
%>
哪位大虾解释下哦 谢谢咯?