标题:调用数据库中的第8以后的文章,杂改,谢谢
只看楼主
baisl100
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2011-6-10
结帖率:100%
已结贴  问题点数:0 回复次数:4 
调用数据库中的第8以后的文章,杂改,谢谢
set rs9=server.CreateObject("ADODB.RecordSet")
rs9.Source="select top 7 * from "& db_News_Table &" where istop=1 order by newsid desc"
rs9.Open rs9.Source,conn,1,1
do while not rs9.EOF
title=trim(rs9("title"))
搜索更多相关主题的帖子: 数据库 文章 title where 
2011-07-11 07:59
baisl100
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2011-6-10
得分:0 
<%
                            set rs9=server.CreateObject("ADODB.RecordSet")
                            rs9.Source="select top 7 * from "& db_News_Table &" where istop=1 order by newsid desc"
                            rs9.Open rs9.Source,conn,1,1
                            do while not rs9.EOF
                            title=trim(rs9("title"))
                        %>
                      <img src="images/dot_blue.gif"> <a class=middle target="_blank" href="ReadNews.asp?NewsId=<%=rs9("newsid")%>" title="<%=htmlencode4(title)%>"> <font color=<%=rs9("titlecolor")%>>[<%=CutStr(htmlencode4(rs9("title")),20)%>]</font> </a> <a class=middle target="_blank" href="ReadNews.asp?NewsId=<%=rs9("newsid")%>" title="<%=htmlencode4(title)%>"><%=CutStr(nohtml(rs9("Content")),15)%></a>
                      <!--评-->
                      <%if reviewable="1" then%>
                      <% if rs9("titlesize")>=1 then %>
                      <A class=middle HREF="<%=path%>Review.asp?NewsID=<%=rs9("NewsID")%>" target="_blank" > <font color=red><b>评</b></font></A>
                      <%end if %>
                      <%end if %>
                      <!--评-->
                      <br>
                      <%
                            rs9.movenext
                            loop
                            rs9.close
                            set rs9=nothing
                        %>
2011-07-11 08:54
wangnannan
Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18
等 级:贵宾
威 望:87
帖 子:2545
专家分:9359
注 册:2007-11-3
得分:20 
select top 7 * from "& db_News_Table &" where istop=1 order by newsid desc

select * from  "& db_News_Table &"  where istop=1 and newsid not in (select top 7 newsid from "& db_News_Table &" where istop=1) order by newsid desc

出来混,谁不都要拼命的嘛。 。拼不赢?那就看谁倒霉了。 。有机会也要看谁下手快,快的就能赢,慢。 。狗屎你都抢不到。 。还说什么拼命?
2011-07-11 16:28
baisl100
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2011-6-10
得分:0 
谢谢,问题已经解决,谢谢了
2011-07-11 18:29
baisl100
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2011-6-10
得分:0 
我用的是:
<%
dim jishu
jishu = 0
                            set rs9=server.CreateObject("ADODB.RecordSet")
                            rs9.Source="select top 14 * from "& db_News_Table &" where istop=1 order by newsid desc"
                            rs9.Open rs9.Source,conn,1,1
                            do while not rs9.EOF
                            title=trim(rs9("title"))
                            jishu = jishu + 1
                            If (jishu > 7) Then
                        %>
2011-07-11 18:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-345181-1-1.html




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

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