Tie Breaker Winner Incorrect

Post here to discuss topics relate to the 4.x version for the ASP Football Pool software program. All support topics should go here.
Post Reply
HZass
Posts: 19
Joined: Mon Sep 02, 2013 9:54 am

Tie Breaker Winner Incorrect

Post by HZass »

I had a case this past weekend where the incorrect winner was selected, based on Tie Breaker Points. The combined points for Mondays game was 44 points. One person had TB point guess of 59 and the other a TB guess of 44 (difference of 7 points). The winner that was recorded had the TB guess of 59 points (difference of 15 points). However, I believe the correct winner should be the person who had a TB guess of 44 points.
The rules state that it does not matter if guess is more or less than the actual total.

The question is where and in which file is the Winner selected in the case of a tie?
Last edited by HZass on Wed Oct 08, 2014 7:04 pm, edited 2 times in total.
User avatar
Spooky
Posts: 4
Joined: Fri Aug 22, 2014 10:13 am

Re: Tie Breaker Winner Correct?

Post by Spooky »

You should double check your scores on the "Enter Game Scores" under the Admin menu and go back to week 5.

The Week 5 TieBreaker game was Seahawks (27) over Redskins (17). That is a combined score of 44 pts.

[edit] Ah, I see I misread some of your post, and that you likely have a repeated typo in the represented players points. As for your issue, I would have to suspect that you have modified something along the way that is causing this, because the pool has never had that issue in my experience. [/edit]
HZass
Posts: 19
Joined: Mon Sep 02, 2013 9:54 am

Re: Tie Breaker Winner Correct?

Post by HZass »

I found the cause of the issue. The database query in the GetWeeklyTiebreakerActual(week) is not correct in the weekly.asp file, starting at line 238. The current query treats the VisitorScore and the HomeScore as numberics; but the database definition is that these are text fields. thus, for the example the function returns 2717, which is the concatenation of the two text fields, rather than the sum which should be 44. Using the VAL() builtin function corrects this condition. The following is the correct functions:
function GetWeeklyTiebreakerActual(week)

dim sql, rs

GetWeeklyTiebreakerActual = ""
sql = "SELECT (Val(VisitorScore) + Val(HomeScore ) )AS Total " _
& " FROM Schedule" _
& " WHERE Week = " & week _
& " ORDER BY [Date] DESC, [Time] DESC"
set rs = DbConn.Execute(sql)
if not (rs.EOF and rs.BOF) then
if not IsNumeric(rs.Fields("Total").Value) then
exit function
end if
GetWeeklyTiebreakerActual = rs.Fields("Total").Value
end if

end function
Post Reply