Menu

Tie Breaker Not Working As Expected

Help
Ryan
2009-10-15
2013-04-11
  • Ryan

    Ryan - 2009-10-15

    The total score tie breaking system does not seem to be working properly.  I have two users who tied in games-won and the tie breaking game (jets vs dolphin week 5) had a total score of 58.  One of the users chose 45 as his total score for that final game and the other chose 43.  I would think that the user closest to the actual total score would win, but the application chose the user furthest away from that total score instead.  What's the issue here and how can I fix it?

     
  • SlackFish

    SlackFish - 2009-10-16

    Here is the Fix: Open the file includes/global.inc.php

    Go to or around line 470

    Look for the following code:

    if($row6<mktime()){

      $sql="select * from tmp_$mix$uniq$wc order by score desc, mts";

    }else{

      $sql="select * from tmp_$mix$uniq$wc order by score desc";

    }

    Change the first $sql statement to include " desc" at the end…

    So that now it reads:

     

    $sql="select * from tmp_$mix$uniq$wc order by score desc, mts desc";

     
  • Ryan

    Ryan - 2009-10-16

    My global.inc.php file is only 383 lines long and does not have this sql statement in it.  Please see http://www.ryananderson.net/global.zip for an example of my global.inc.php file.

     
  • Brian Less

    Brian Less - 2009-10-20

    I have also encountered this problem starting in week 5 and continuing for week 6.  It is not properly deciding the winner.  I found the code stated above in the right-column.inc.php file.  When I changed the line mentioned above it still was broke.  It changed it from being the wrong winner to being a tie which was still incorrect.
    The tied-scores are 41/47/49.  The Denver/SD total was 57 and it declared 47 the winner.  After I made the code change it declared the 41 and 49 tied.

     
  • SlackFish

    SlackFish - 2009-10-29

    Oops sorry…

    Here is the Fix: Open the file includes/right-column.inc.php

    Go to or around line 250

    Look for the following code:

    if($row6<mktime()){

    $sql="select * from tmp_$mix$uniq$wc order by score desc, mts";

    }else{

    $sql="select * from tmp_$mix$uniq$wc order by score desc";

    }

    Change the first $sql statement to include " desc" at the end…

    So that now it reads:

    $sql="select * from tmp_$mix$uniq$wc order by score desc, mts desc";`enter code here`

     
  • Brian Less

    Brian Less - 2009-10-29

    This further broke the tiebreaker winner.  Now other weeks that were correct do not properly calculate.

     
  • SlackFish

    SlackFish - 2009-11-04

    Open the file includes/right-column.inc.php

    Go to around line 216 and look for the following sql statement:

    $sql="select score1, score2, game\_time from games where week='$wc' and season='$season' and year='$CINFO' order by id DESC limit 1";

    replace the "order by id" near the end with "order by game\_time", so that the sql statement reads as follows:

    $sql="select score1, score2, game\_time from games where week='$wc' and season='$season' and year='$CINFO' order by game\_time DESC limit 1";

    The following is contrary to what I posted earlier in the forum, however it needs to be done.

    Go to or around line 250

    Look for the following code:

    if($row6 < mktime()){

    $sql="select * from tmp_$mix$uniq$wc order by score desc, mts";

    }else{

    $sql="select * from tmp_$mix$uniq$wc order by score desc";

    }

    Change the first $sql statement to include " asc" at the end…

    So that now it reads:

    $sql="select * from tmp_$mix$uniq$wc order by score desc, mts asc";

     
  • Brian Less

    Brian Less - 2009-11-05

    That did it!  Thank for fix.

     

Log in to post a comment.