<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim rsTop Dim rsTop_cmd Dim rsTop_numRows Set rsTop_cmd = Server.CreateObject ("ADODB.Command") rsTop_cmd.ActiveConnection = MM_conn_STRING rsTop_cmd.CommandText = "SELECT * FROM tblScores ORDER BY PlayerTime limit 10" rsTop_cmd.Prepared = true Set rsTop = rsTop_cmd.Execute rsTop_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 10 Repeat1__index = 0 rsTop_numRows = rsTop_numRows + Repeat1__numRows %> Top Ten <% While ((Repeat1__numRows <> 0) AND (NOT rsTop.EOF)) %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsTop.MoveNext() Wend %>
Top Ten  
<%=(rsTop.Fields.Item("PlayerName").Value)%> <%=(rsTop.Fields.Item("PlayerTime").Value)%>
<% rsTop.Close() Set rsTop = Nothing %>