ok gang. I have this code to get the data from mssql db
set standings1 = conn.execute("select points, team, wins, losses, win_pct
from tblStats order by wins desc, points desc, team asc")
numRealPos = 0
numDisplayPos = 1
do while not standings1.eof
var_P = standings1.fields.item("points").value
var_T2 = trim(standings1.fields.item("team").value )
var_W = standings1.fields.item("wins").value
var_L = standings1.fields.item("losses").value
var_PCT = standings1.fields.item("win_pct").value
numRealPos = numRealPos + 1
If Not var_W = numLastValue Then
numLastValue = var_W
numDisplayPos = numRealPos
End If
now, this does sort the data by the wins.... but i would like to actually
sort it by wins, then points.
i use this script because if 2 teams have the same amount of wins, it shows
them as the same place. so i want to include the points as well. then it
wold only show the same place if both wins and points are the same.
let me show an example of what i mean.
http://clanwars.gig-gamers.com/standings.asp
it shows the rank, which is the numDisplayPos based on the wins.
if you look at the table on the right, it shows the last 2 teams as tied.
they have the same amount of wins. but one team has more points, so should
be higher on the rank. i only want it to show the same rank if both wins and
points are the same values.
hope this makes sense.
TIA
Jeff