<?php
	$query = "SELECT p.id,p.name,p.rank,p.kills,p.country, w.knifekills,w.knifetime, ((w.knifekills/w.knifefired)*w.knifekills) as topk FROM player AS p, weapons AS w WHERE w.id = p.id AND w.knifefired > 0 AND time > 360000 ORDER BY topk DESC LIMIT 5";

$query2 = "SET @n:=0";
$query3 = str_replace("FROM", ", @n:=@n+1 as num FROM", $query);
$query3 = str_replace("LIMIT 5", "", $query3);
?>
