·求知读库技巧...?
ID B C D E J
-----------------------
1 0 0 5 5 0
2 0 0 6 6 0
3 0 0 8 8 0
4 0 0 9 9 3
5 0 0 10 10 3
-----------------------
以上是库中的大致状态,字段 ID 是主建,那么字段 J 的字段值和 ID 的字段值相等的有 ID3/4/5、输出语句如下:
...
<%
rs.AbsolutePage = iPage
For iPage = 1 to rs.PageSize
if rs.EOF then
Exit For
%>
<tr>
<td width="272" height="16" class="main"> <a href="view.asp?ContId=<%=rs.Fields("ID")%>">
<% If rs.Fields("C") Then
Response.Write "<font color=red> √ </font>"
End If
Response.Write rs.Fields("B")
%></a></td>
<td width="99" height="16" class="main" align="center"><%=rs.Fields("C")%></td>
<td width="137" height="16" class="main" align="center"><%=rs.Fields("D")%></td>
<td width="153" height="16" class="main" align="center"><%=rs.Fields("E")%>·</td>
<td width="65" height="16" class="main" align="center"><%=rs.Fields("J")%></td>
</tr>
<%
rs.MoveNext
Next
response.write "</table></center></div>"
...
%>
以上语句的: <td width="153" height="16" class="main" align="center"><%=rs.Fields("E")%>·</td> 只能输出 ID3 的 E字段值...
但我想输出 J = ID 的最后一条记录的 <%=rs.Fields("E")%> ,也就是 ID=5 的<%=rs.Fields("E")%> 值。
·我该如何实现?