<?php
	$query = "SELECT p.name as pname, p.rank as prank, p.id as pid, ph.time as phtime, ph.score as phscore, ph.cmdscore as phcmdscore, ph.skillscore as phskillscore, ph.teamscore as phteamscore, ph.kills as phkills, ph.deaths as phdeaths, ph.army as pharmy, m.name as mapname, rh.* FROM `player_history` as ph, `round_history` as rh, `mapinfo` as m, `player` as p WHERE ph.id = '$PID' AND (ph.timestamp-ph.time) BETWEEN rh.timestamp AND (rh.timestamp+rh.time) AND rh.mapid=m.id AND p.id=ph.id AND rh.gameport=ph.gameport AND ph.time > 0 ORDER BY ph.timestamp DESC LIMIT 50;";
?>