Band details

[insert_php]
if (get_query_var(“ID”)) {
$ID = get_query_var(“ID”);
}

$db=mysqli_connect(“localhost”,”kristoflodewijk”,”Gd52CDpi”,”kristoflodewijk”);
if (mysqli_connect_errno($db))
{
echo “Failed to connect to MySQL: ” . mysqli_connect_error();
}

$sql_q = “SELECT * FROM music_bands WHERE ID='”.$ID.”‘”;

$result = mysqli_query($db,$sql_q);

$row = mysqli_fetch_array($result);

echo “

” ;
$country_q =”SELECT * FROM countries WHERE ID='”.$row[‘country_ID’].”‘”;
$country = mysqli_query($db, $country_q);
$country_info = mysqli_fetch_array($country);
echo “

“;
echo “

Name “.$row[‘name’] .”
Country: “.$country_info[‘name’].”
Website: Link

“;
/*
$venue_q =”SELECT * FROM music_venues WHERE ID='”.$row[‘venue_ID’].”‘”;
$venue = mysqli_query($db, $venue_q);
$venue_info = mysqli_fetch_array($venue);
echo “

Venue “.$venue_info[‘name’].”

“;
echo “

More info “.$row[‘more_info’].”

“;
*/
[/insert_php]

Concerts by this band

[insert_php]
$db=mysqli_connect(“localhost”,”kristoflodewijk”,”Gd52CDpi”,”kristoflodewijk”);
if (mysqli_connect_errno($db))
{
echo “Failed to connect to MySQL: ” . mysqli_connect_error();
}

$sql_q = “SELECT * FROM music_concerts WHERE band_ID = ‘”.$ID.”‘ ORDER BY date DESC”;
$result = mysqli_query($db,$sql_q);
$concert_count = $result->num_rows;

echo “There are “.$concert_count.” concerts of this band listed in the database.”;
[/insert_php]

[insert_php]
$db=mysqli_connect(“localhost”,”kristoflodewijk”,”Gd52CDpi”,”kristoflodewijk”);
if (mysqli_connect_errno($db))
{
echo “Failed to connect to MySQL: ” . mysqli_connect_error();
}

$sql_q = “SELECT * FROM music_concerts WHERE band_ID = ‘”.$ID.”‘ ORDER BY date DESC”;
$result = mysqli_query($db,$sql_q);

while($row = mysqli_fetch_array($result))
{
echo “

” ;
$venue_q =”SELECT * FROM music_venues WHERE ID='”.$row[‘venue_ID’].”‘”;
$venue = mysqli_query($db, $venue_q);
$venue_info = mysqli_fetch_array($venue);
echo “

“;
$more_info =”Click here“;
echo “

“;
}
[/insert_php]

Date Venue More info
“.$row[‘date’] .” “.$venue_info[‘name’].” “.$more_info.”