ASP计算结果如何排序?
这是一个统计每月及合计加班时间的网页.合计时间hjjb(倒数第七行)是计算的结果(倒数第九行),如果要以这个结果来排序,该怎么办呀?谢谢 <!--#include file="checkuser.asp"-->
<!--#include file="../data.asp"-->
<%dim rs,n,m,sY
sY=request.querystring("sY")
if sY="" then sY=year(date())
set rs=server.createobject("adodb.recordset")
rs.open "select AUserName from admin order by AUserName",MyCon,1,1
redim list(rs.recordcount-1) '名单表
redim jb(rs.recordcount-1,11) '请假和加班数组
'获得人员名单
for n=0 to rs.recordcount-1
list(n)=rs(0)
'ReDim Preserve list(ubound(list)+1)
rs.movenext
next
rs.close
for n=0 to ubound(list,1)
for m=0 to 11
set rs=MyCon.execute("select sum(加班) from 加班 where 姓名='"&list(n)&"' and year(日期)='"&sY&"' and month(日期)='"&m+1&"'")
if isnull(rs(0)) then
jb(n,m)=0
else
jb(n,m)=formatnumber(rs(0),2,-1,0,0)
end if
rs.close
next
next
set rs=nothing
CloseDatabase%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>考勤统计</title>
</head>
<body bgcolor="#E9F6FF">
<div align="center">
</div>
<div align="center">
<table border="1" style="border-collapse: collapse; font-size:11pt" bordercolor="#999999">
<tr bgcolor="#F6F6F6">
<td width="70"><b><font color="#FF0000">加班</font></b></td>
<%for n=1 to 12%>
<td width="70"><%response.write n%></td>
<%next%>
<td width="70">合计</td>
</tr>
<%dim hjjb
hjjb=0
for n=0 to ubound(list,1)%>
<tr <%if n mod 2<>0 then response.write "bgcolor=""#F6F6F6"""%>>
<td width="70"><%response.write list(n)%></td>
<%for m=0 to 11%>
<td width="70"><%response.write jb(n,m):hjjb=hjjb+jb(n,m)%></td>
<%next%>
<td width="70"><%=hjjb%></td>
</tr>
<%hjjb=0
next%>
</table>
</div>
</body>
</html>