if ($_GET["playerid"] == "") {
header("Location: players.php");
}
$query = "select a.*, b.description as rank, c.name as countryname, f.description as navyrankdesc, g.name as militaryunit, (select max(d.damage) from wars_playersdamage d, wars e where d.warid = e.warid and d.playerid = a.playerid and e.regiontypeid = 0) as maxdmg, (select max(d.damage) from wars_playersdamage d, wars e where d.warid = e.warid and d.playerid = a.playerid and e.regiontypeid = 1) as maxnavydmg, (select max(d.hits) from wars_playersdamage d, wars e where e.warid = d.warid and d.playerid = a.playerid and e.regiontypeid = 0) as maxhits, (select max(d.hits) from wars_playersdamage d, wars e where e.warid = d.warid and d.playerid = a.playerid and e.regiontypeid = 1) as maxnavyhits from players a, ranks b, countries c, navyranks f, militaryunits g where g.muid = a.muid and f.navyrankid = a.navyrank and a.countryid = c.countryid and a.militaryrank = b.rankid and a.playerid = ".$_GET["playerid"];
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
while ($row = mysql_fetch_array($result)) {
echo "







"; echo "
".number_format($row["maxdmg"], 0, '.', ',')."
".number_format($row["maxhits"], 0, '.', ',')."
".number_format($row["maxnavydmg"], 0, '.', ',')."
".number_format($row["maxnavyhits"], 0, '.', ',')."";
}
mysql_free_result($result);
if ($numrows == 0) {
header("Location: players.php");
}
?>
".$row["name"]."
Strength

".$row["strength"]."
Military Rank

".$row["militaryrank"]." - ".$row["rank"]."
Intelligence

".$row["intelligence"]."
Navy Rank

".$row["navyrank"]." - ".$row["navyrankdesc"]."
Experience Level

".$row["level"]."
Citizenship

".$row["countryname"]."
Military Unit

".$row["militaryunit"]."
"; echo "
Highest Damage in a Land Battle
".number_format($row["maxdmg"], 0, '.', ',')."
Highest Hits in a Land Battle
".number_format($row["maxhits"], 0, '.', ',')."
Highest Damage in a Naval Battle
".number_format($row["maxnavydmg"], 0, '.', ',')."
Highest Hits in a Naval Battle
".number_format($row["maxnavyhits"], 0, '.', ',')."