Standings New
'calendar.instone.com',
'username' => 'u34lawbrggszh',
'password' => 't^#@jb2pk@cC',
'database' => 'dbdrx3xhnw9omr',
);
$mysqli = new mysqli($db["hostname"], $db["username"], $db["password"], $db["database"]);
// Check connection
if ($mysqli -> connect_errno) {
echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
exit();
}
// Perform query
$query = "SELECT * FROM view_team_rankings ";
if ($result = $mysqli->query($query)) {
// Check if there are any rows returned
if ($result->num_rows > 0) {
// Initialize a variable to keep track of the current division
$currentDivision = '';
// Display the table structure
echo "";
echo "";
echo "
";
} else {
echo "No teams found.";
}
// Free result set
$result->free_result();
} else {
echo "Query error: " . $mysqli->error;
}
// Closes connection
$mysqli->close();
?>
Name | Score |
Division: " . $currentDivision . " | |
" . $row['Name'] . " | "; echo "" . (2 * $row['TotalScore']) . " | "; echo "