I'm not all that certain how to go about this, but here's what I am trying to do:
Firstly, coding in PHP and using MySql DB.
I have a table (called overall) that holds each individual Softball teams stats.
1. team (team name)
2. gp (games played)
3. win (# of wins)
4. loss (# of losses)
5. rf (runs for)
6. ra (runs against)
7. pct (win percentage)
I want to query the DB and retrieve the teams in order of their ranking(basically calculate their 'ranking' on-the-fly)
My guess would be something like this:
select * from overall ORDER BY pct desc, win desc, loss asc
the 'rf' and 'ra' fields come into play somehow, though no idea at the moment, but I'll focus on that once I figure out how to get that far...
Anyone have any suggestions?