First off-fantastic program. I'd been using Turbo Tourney for years but got tired of manually posting the whole site after each score update. With Tourney I can update from my phone! Well done!
So here's my issue: when I run the Paths to Victory (from a terminal using using), it populates the "end_games" table (with 53,504 entries) but none of the other scoring tables. Additionally, all of the bracket entries are then changed to TRUE for the eliminated field. I have run both the php command with and without the truncated option and also manually truncated the tables and restarted the process. I have 8 scoring position but I changed the database option to 3 and tried that instead and got the same result.
Any tips for debugging this?
OK - Brett again. I just created a real user account instead of the Google login. Correction, I used the "php" command from terminal, it ran for about 15 seconds and the dropped back to the shell prompt.
Strangely enough, I also have 53504 records instead of 32768. (running from terminal) Some of my users have been marked eliminated, but according to 'what if' some of those marked eliminated still have existing paths to victory. Not sure what is going on, this part was always Rob's baby.
53504 comes from 32768+16384+4096+256. There are 32768 "round=7" entries, 163864 "round=6" entries etc. It just isn't cleaning up the old entires - which may have been done for speed. To get the behavior you desire, which may be worthwhile to speed up later queries, you can add line lines such as the following:
> $query = "DELETE FROM `end_games` WHERE `round`=".$previousRound;
> mysql_query($query, $db);
These two lines at the end of enumerateLaterRound simply wipe the data from the prior rounds so you don't have it hanging around. With this change, we can also eliminate the "WHERE round=7" parts of other queries to improve performance.
I hope this is helpful.
Let me look at this.
I ran this last night with no problems at all. Took 2 minutes running it manually from the command line.
FYI, I also have 53504 records.
This code can probably be written better - as with everything on this project, it was most likely written at the last minute.
And I probably should have commented it since I am not immediately grokking what I did…
If you don't mind, can you send me the link to a bracket that is eliminated but still shows up in the what if tool?
It looks like the process is to
1. Mark all brackets as eliminated
2. Query the possible_scores for any bracket greater than $maxScoreRanks
3. Mark those as uneliminated
This logic above will mark last place brackets as eliminated.
So from that process, I'd guess that possible_scores is not getting filled up. Since it doesn't find any brackets finishing with the top 8 or 3 ranks, it leaves everything as eliminated.
$maxScoreRanks is set in admin/database.php
In the trunk, it's set to 3 by default.
OK, found one mea culpa issue. For whatever reason I had the older calculate_paths file with the paid=1 qualifier instead of paid<>0.
So possible_scores is now populated however, now the "possible scores" are all 0 so my rankings only show the last 8 brackets in the pool as potential winners. I'll work on it further and see where the issue is now. I'm checking revision numbers now and hopefully that will be my issue.
Success! Somehow my master table got cleared out. Repopulating it corrected the issue and my scenarios have now been generated for the 8 money position and last place. Thanks for the help guys.