<?php
	$query = "SELECT ph.*, p.name FROM `player_history` as ph, `player` as p WHERE p.id=ph.id AND ph.gameport=$RPORT AND ph.timestamp BETWEEN $RCUR AND $RNEXT ORDER BY ph.score DESC, ph.kills DESC;";

?>