给你看看 老鸭8的小程序
上段
<%
set rs1=server.createobject("ADODB.Recordset")
sql1="select Top 10 ID,Title,Content,ClassID,TitleFontColor,DateAndTime from pcook_Article where yn = 0 and IsHot = 1 order by hits desc,id desc"
rs1.open sql1,conn,1,3
If Not rs1.Eof Then
do while not (rs1.eof or err)
set rsClass=server.createobject("adodb.recordset")
sql = "select * from pcook_Class where ID="&rs1("ClassID")&""
rsClass.open sql,conn,1,1
ClassName=rsClass("ClassName")
rsClass.close
set rsClass=nothing
%>
调用列表格式
<div class="movies hbg">
<ul>
<li class="names">
<a href="<%If seo=1 then%>Article_<%=rs1("ID")%>.html<%elseif seo=2 then%>Article/?<%=rs1("ID")%>.html<%elseif seo=3 then%>List.asp?ID=<%=rs1("ID")%><%elseif seo=4 then%>Article/<%=rs1("ID")%>.html<%end if%>" title="<%=rs1("title")%>" target="_blank">·<%if rs1("TitleFontColor")<>"" then Response.Write("<font style=""color:"&rs1("TitleFontColor")&""">"&left(LoseHtml(rs1("title")),30)&"</font>") else Response.Write(""&left(LoseHtml(rs1("title")),30)&"") end if%></a>
</li>
</ul>
</div>
结束语
<%
rs1.movenext
loop
end if
rs1.close
set rs1=nothing
%>
----------
这样我们套用这个公式 就可以自定义调用数据了挖