这些代码看起来有些怪,假如我要按日期adddate排序,怎么写?

ad163 2006-08-12 09:04:02
<%
sql2="select * from [category]"
set rs2=conn.execute(sql2)
if not rs2.bof then
Do While Not rs2.eof
if rs2("categoryid")=categoryid then
Response.Write("<font color=black>" & rs2("category") & "</font> | ")
else
Response.Write("<a href=photo.asp?categoryid=" & rs2("categoryid") & ">" & rs2("category") & " ")
Response.Write("</a> | ")
end if
i=i+1
rs2.MoveNext
Loop
end if
rs2.close
%>

这些代码看起来有些怪,假如我要按日期adddate排序,怎么写?
...全文
107 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
spook768 2006-08-12
  • 打赏
  • 举报
回复
leohuang(LEO) 正解
leohuang 2006-08-12
  • 打赏
  • 举报
回复
sql2="select * from [category] order by [adddate] desc"

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧