程序讨论版须知: 在使用老y文章管理系统中的一些问题!对非本程序方面的问题恕不解答!对Html,css等基础问题恕不解答!如果没有HTML基础请先自学HTML! 需要打开你网站才能看出问题的请留下网址,并请保留本站版权及友情链接,否则不予回复。 |
|
程序讨论
站长交流
链接交换
商业用户区
|
楼主Time:2017/5/3 15:29:51 | |
|
首页头条文章如何无序显示
<%
set rs1=server.createobject("ADODB.Recordset") sql1="select Top 1 ID,Title,Images,ArtDescription,TitleFontColor from "&tbname&"_Article where yn = 0 and IsTop = 1 and IsHot = 1 order by DateAndTime desc,ID Desc" rs1.open sql1,conn,1,3 If Not rs1.Eof Then do while not (rs1.eof or err) %><h4><a href="<%=apath(rs1("ID"),0)%>"><%If rs1("TitleFontColor")<>"" then Response.Write("<font style=""color:"&rs1("TitleFontColor")&""">") End if%><%=rs1("Title")%><%If rs1("TitleFontColor")<>"" then Response.Write("</font>") End if%></a></h4> <div class="topjx"> <%=left(LoseHtml(rs1("ArtDescription")),100)%>……[<a href="<%=apath(rs1("ID"),0)%>">详细</a>]</div> <% |
[Top] |
2 楼Time:2017/5/4 12:10:07 | |
|
RE:首页头条文章如何无序显示
sql1="select Top 1 ID,Title,Images,ArtDescription,TitleFontColor from "&tbname&"_Article where yn = 0 and IsTop = 1 and IsHot = 1 order by DateAndTime desc,ID Desc"
sql1="select Top 1 ID,Title,Images,ArtDescription,TitleFontColor from "&tbname&"_Article where yn = 0 and IsTop = 1 and IsHot = 1 order by Rnd(ID-timer()),ID Desc" 自己解决了 |
[Top] |