注册 登录
编程论坛 ASP技术论坛

关于排序?

w136290854 发布于 2008-11-27 16:55, 690 次点击
<%set rs=server.createobject("adodb.recordset")
sql="Select top 30 * from Staff  where name='"&name&"' and sid='"&sid&"' and cate="&cate
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
%>这段代码我想让内容升序排怎么写啊?
2 回复
#2
lili06102008-11-27 17:57
sql="Select top 30 * from Staff  where name='"&name&"' and sid='"&sid&"' and cate='"&cate&"' ORDER BY Id DESC "
#3
kgm5452008-11-28 22:15
DESC是降序,ASC是升序,默认为升序。
1