SQL Query to Identify Draft Pool
Using OOTP 20. I'm working on creating a web application to replace my Excel spreadsheet that I've used in the past for generating custom rankings for an amatuer draft. Copying, pasting, and parsing HTML generated reports gets old and with access to a MySQL db dump, direct queries seems to be a better way to go.
However, I'm having trouble replicating the results of draftees generated directly by OOTP vs SQL. The OOTP draft pool shows 1550 eligible players. My first attempt:
SELECT Count(*) from players
where draft_eligible=1
This results in 3,879 players. Adding experience = 0 to the query drops the count to 1,533.
I then started cross-referencing names from the OOTP generated list against the query list. Some players in my query results were not showing up on the OOTP list. Isolating them in their own query, I can't find any difference in the player table that would suggest why one appears in my results versus the OOTP list. I'm thinking that I might need to join the player_roster_status table although only two fields (pro_service_days, and pro_service_years) makes sense in this context.
For those who have experience generating draft lists, what am I missing?
|