Code: |
SELECT teams.leagueid,teams.teamname,teams.teamid,teams.abbrev,teams.name,teams.username,{$f_leaguecap} AS CAP,{$f_leaguerostersize} AS SIZE,sum(auction.bid) AS USED,({$f_leaguecap}-sum(auction.bid)) AS CAPLEFT,count(auction.bid)-1 AS PLAYERS,({$f_leaguerostersize}-(count(auction.bid)-1)) AS EMPTYSPOTS,SUM(FORMAT((((players.dst_int*2)+(players.dst_dtd*6)+(players.dst_dfr*2)+(players.dst_sack)+(players.dst_sty*2))+players.pass_yds/25+players.pass_td*4+players.pass_int*-2+players.rush_yds/10+players.rush_td*4+players.rec_yds/10+players.rec_td*4+players.fl*-2+players.fg*3+players.xpt),0)) AS FPts
FROM fs_teams AS teams
LEFT JOIN fs_football_auction_{$leagueid} AS auction
ON auction.teamid = teams.teamid
LEFT JOIN fs_football_players_{$leagueid} AS players
ON auction.playerid = players.id
WHERE teams.leagueid = {$REQUEST:leagueid} AND teams.sport='Football' AND teams.teamid<={$f_teams} AND auction.high !='NO' AND auction.bidtime >='0000-00-00 00:00:00'
GROUP BY teams.teamid
|
Using the above code, I would like to be able to sort the "FPts" column using server-side pagination.