Well...I'll try to explain it...and it's only one page with a few posts...
But, here is the code:
(SELECT COUNT(*) FROM sportsdb_wins WHERE winner = teamid AND (winortie = 3 or winortie = 1) AND (SELECT teamdiv FROM sportsdb_teams WHERE teamid = loser) = teamdiv) AS divwins,
Basically, divwins is supposed to select the teamID of the current row, if the winortie value is 3 or 1 (if they won or won by forfeit), if the losing team is a team that in their teamdiv (conference).
This value should be 5, but it is returning three. When I run the query in PHPMyAdmin, filling in the variables with an example of a teamid/teamdiv combination that would be used by the script, it still returns the Number three.
Let me know what other information is needed...