OBP

OBP Leaders

“);
echo(“

“);
echo(“

All Time

“);

$get_OBP_leaders=$conn->query(“SELECT P.nameFirst, P.nameLast, P.finalGame, (SUM(B.H)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP))/(SUM(B.AB)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP)+SUM(B.SH)) AS OBP FROM `batting` B, `people` P WHERE B.playerID=P.playerID GROUP BY B.playerID HAVING SUM(B.AB)>500 ORDER BY OBP DESC LIMIT 500”);

echo(“

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

“);
}
echo(“

Name OBP Final Game
$row[nameFirst] $row[nameLast] $row[OBP] $row[finalGame]

“);

echo(“

Active

“);

$get_active_OBP_leaders=$conn->query(“SELECT P.nameFirst, P.nameLast, P.finalGame, (SUM(B.H)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP))/(SUM(B.AB)+SUM(B.BB)+SUM(B.IBB)+SUM(B.HBP)+SUM(B.SH)) AS OBP 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 HAVING SUM(B.AB)>25 ORDER BY OBP DESC LIMIT 500”);

echo(“

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

“);
}
echo(“

Name OBP Final Game
$row[nameFirst] $row[nameLast] $row[OBP] $row[finalGame]

“);

echo(“

“);

?>

Trackback

no comment until now

Sorry, comments closed.