| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 413 人关注过本帖
标题:[求助]SQL
取消只看楼主 加入收藏
yonyon275
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-10-26
收藏
 问题点数:0 回复次数:0 
[求助]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
%>

哪位大虾解释下哦 谢谢咯?
搜索更多相关主题的帖子: SQL 
2006-11-06 13:27
快速回复:[求助]SQL
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.036595 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved