%@ LANGUAGE="VBSCRIPT" %>
<%Option Explicit %>
Game Listing
Player's Game Listing
<%
DrawRatingsLegend(clng(request("G_ID")))
%>
<%
'
'| Played |
'Player |
'Player |
'Player |
'Player |
'
dim rst, sql, n, cnt, match_id
sql = "SELECT Match.Game_ID, Match.Played, Match.Match_ID, Match.Num_Players, Match.Tot_Score, Score.Score, Player.Player_Name, Score.Before_Rating, Score.After_Rating, ScrRank.Rank_Text AS ScrRank_Txt, PlrRank.Rank_Text AS PlrRank_Txt, ScrRank.Rank_Color AS ScrClr, PlrRank.Rank_Color AS PlrClr, Score.Improve_Flag, PlayedIn.Player_ID " & _
"FROM Score AS PlayedIn INNER JOIN (Player INNER JOIN (Match INNER JOIN ((Score INNER JOIN Rank AS ScrRank ON Score.Score_Rank_ID = ScrRank.Rank_ID) INNER JOIN Rank AS PlrRank ON Score.Before_Rank_ID = PlrRank.Rank_ID) ON Match.Match_ID = Score.Match_ID) ON Player.Player_ID = Score.Player_ID) ON PlayedIn.Match_ID = Match.Match_ID " & _
"WHERE (((Match.Game_ID)=" & clng(request("G_ID")) & ") AND ((PlayedIn.Player_ID)=" & Clng(Request("P_ID")) & ")) " & _
"ORDER BY Match.Played DESC , Match.Match_ID DESC , Score.Score DESC , Player.Player_Name;"
set rst = GetRecordset(TheDB, sql)
cnt = 0
match_id = 0
do while not rst.eof
if match_id <> rst("Match_ID") then
if match_id <> 0 then
response.write ""
cnt = cnt + 1
if cnt > 51 then exit do
end if
response.write ""
response.write "| " & rst("Played") & " | "
match_id = rst("Match_ID")
end if
response.write "" & rst("Player_Name") & ": "
response.write "" & rst("Score")
if rst("Improve_Flag") then
response.write "+"
else
response.write "-"
end if
response.write ""
rst.movenext
loop
if match_id <> 0 then response.write " |
"
rst.close
set rst = nothing
CleanupTheDB
%>
Return to Game list.