W/L | Peter's Sports League Standings | Forum
Back to the sports standings script page
2:37 pm
And, sorry for the many posts but I just started working with this and am posting as I notice any issues or wants…
This one isn't a big need, but I would like to be able to list Home wins/losses and Away wins/losses. So, in the end, I'd like my table to look like this:
OVERALL | CONF | HOME | AWAY | ||||||||||
TEAM | GP | W | L | W | L | RF | RA | GB | PCT | W | L | W | L |
Thanks in advance!
In short, yes.
For the individual team table, see the sls_team_schedule function in standings_functions.php. In the loop of games, you can compare the $teamtosort value to the away team or home team (which are stupidly called "losingteam" and "winningteam" in the database).
As for showing home and away win-loss records, this is not stored in the sportsdb_teams table, so you'll either have to add those database fields and then tweak the edit actions to inject that information. Or, you will have to write your own queries in standings.php to dynamically fetch this information on every page load.