2017家长会发言:Order By '"&de&"' DESC,sunxuid"

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/05 01:39:29
Function shownews(typeid,typenm,top,de)

Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "Select top "&top&" * from [ninenews] Where typeid="&typeid&" OR typename='"&typenm&"' Order By '"&de&"' DESC,sunxuid",Conn,1,1
if rs.eof and rs.bof then
response.write "<table width=100% border=0 align=Center cellpadding=0 cellspacing=0><tr><td height=20></td></tr><tr><td align=center>"
response.write "<font color=red>"&"暂无内容"&"</font>"
response.write "</td></tr></table>"
end if
Do while NOT rs.Eof
%>
<TABLE width="100%" border="0" align="Center" cellpadding="0" cellspacing="0">
<TR>
<TD width="10" Valign=top align=right>·</TD>
<TD><a title="<%=DatetoStr(rs("dateandtime"),"Y-m-d")%>" href="fen/news.asp?id=<%=rs("newsid")%>" target="_blank"><%=cutstr(rs("title"),10)%></a></TD>
</TR>
<TR>
<TD colspan=2 height=10 Valign=top align=right></TD>
</TR>
</TABLE>
<%
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Function
为什么用这个函数做出来的排顺是不正常的呢!~~~~

Order By '"&de&"' DESC,sunxuid"
这句是什么意思呢?
能不能说的在详细一些啊,还有就是排出来的顺序不是降顺出来的,而是反的.

按照 de的值所在的字段 和 sunxuid 字段进行倒序 排序