PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$gamesqry="select team.*,sum(scores.score) as score from tbl_teams team,tbl_result scores where scores.team_id=team.team_id group by team.team_id order by scores.score DESC";
$gamesqry="
SELECT team.*, sum(scores.score) as score
FROM tbl_teams team, tbl_result scores
WHERE scores.team_id = team.team_id
GROUP BY team.team_id
ORDER BY sum(scores.score) DESC";