$sql = 'SELECT player,sum(kills) as tkills ,sum(death) as tdeath,sum(time) as ttime, sum(points) as total_points , sum(position) as tpos, sum(position = 1) as wins, count(*) as tgames FROM '.$dbprefix.'playerstats WHERE player LIKE \'%'.$player.'%\' GROUP BY player ORDER BY total_points desc LIMIT 500';