Concerts

On this page you can find an overview of the concerts I have attended in the past and the ones that I have currently scheduled to see in the near future.

[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”;
$result = mysqli_query($db,$sql_q);
$concert_count = $result->num_rows;

$sql_q = “SELECT * FROM music_bands”;
$result = mysqli_query($db,$sql_q);
$band_count = $result->num_rows;

$sql_q = “SELECT * FROM music_venues”;
$result = mysqli_query($db,$sql_q);
$venue_count = $result->num_rows;

echo “Currently there are $concert_count concerts of $band_count bands in $venue_count different venues listed in the database.”;
[/insert_php]

Upcoming concerts

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

$today = date(“Y-m-d”);

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

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

” ;
$band_q =”SELECT * FROM music_bands WHERE ID='”.$row[‘band_ID’].”‘”;
$band = mysqli_query($db, $band_q);
$band_info = mysqli_fetch_array($band);
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 Band Venue More info
“.$row[‘date’] .” “.$band_info[‘name’].” “.$venue_info[‘name’].” “.$more_info.”

Past concerts

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

$today = date(“Y-m-d”);

$sql_q = “SELECT * FROM music_concerts WHERE date < '".$today."' ORDER BY date DESC"; $result = mysqli_query($db,$sql_q); $count = $result->num_rows;

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

” ;
$band_q =”SELECT * FROM music_bands WHERE ID='”.$row[‘band_ID’].”‘”;
$band = mysqli_query($db, $band_q);
$band_info = mysqli_fetch_array($band);
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 “

“;
if (empty($row[‘setlist’])) {
echo “

“;
} else {
echo “

“;
}
}
[/insert_php]

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