程序討論版須知: 在使用老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] |