HR

Home Run Leaders

“);
echo(“

“);
echo(“

All Time

“);

$get_HR_leaders=$conn->query(“SELECT P.nameFirst, P.nameLast, P.finalGame, SUM(B.HR) AS Homers FROM `batting` B, `people` P WHERE B.playerID=P.playerID GROUP BY B.playerID ORDER BY Homers DESC LIMIT 500”);

echo(“

“);
while($row=$get_HR_leaders->fetch_assoc()){
echo(“

“);
}
echo(“

Name Home Runs Final Game
$row[nameFirst] $row[nameLast] $row[Homers] $row[finalGame]

“);

echo(“

Active

“);

$get_active_HR_leaders=$conn->query(“SELECT P.nameFirst, P.nameLast, P.finalGame, SUM(B.HR) AS Homers FROM `batting` B, `people` P WHERE B.playerID=P.playerID AND (LEFT(P.finalGame,4)=’2019′ OR LEFT(P.finalGame,4)=’2018′) GROUP BY B.playerID ORDER BY Homers DESC LIMIT 500”);

echo(“

“);
while($row=$get_active_HR_leaders->fetch_assoc()){
echo(“

“);
}
echo(“

Name Home Runs Final Game
$row[nameFirst] $row[nameLast] $row[Homers] $row[finalGame]

“);

echo(“

“);

?>

Trackback

no comment until now

Sorry, comments closed.