Iím keeping track of baseball stats, and each row represents one line of stats (from a box score) for one player of a single game. Because of this, a single player may have multiple rows in the table. I want to cumulate each playerís stats (so theyíll be one row per player) and display as output, which isnít a problem. Then I want sort by a certain stat, but by now Iíve already looped through the table, so I canít sort using a mySQL query at this point. I tried first putting values into an array in a previous project, but that became extremely complicated. Whatís the best way to approach this?