{$artist['name']}
{$city['name']}, {$country['name']} - {$concert['date']}
Genre | {$genre['name']} |
#inkludera filer include 'db.php'; include 'standard_functions.php'; include 'user.php'; #skapa instanser av klasser $db = new Database(); #ansluter databas $user = new User(); #skicka html-huvud send_html_header(false); #visa sidhuvud show_header('concerts', true); if (isset($_GET['concert']) && !empty($_GET['concert'])) { #hämta artist $query1 = mysql_query("SELECT * FROM concert WHERE id = '{$_GET['concert']}'"); $concert = mysql_fetch_array($query1); $query2 = mysql_query("SELECT * FROM artist WHERE id = '{$concert['artist']}'"); $artist = mysql_fetch_array($query2); $query3 = mysql_query("SELECT * FROM city WHERE id = '{$concert['city']}'"); $city = mysql_fetch_array($query3); $query4 = mysql_query("SELECT name FROM country WHERE id = '{$city['country']}'"); $country = mysql_fetch_array($query4); $query5 = mysql_query("SELECT * FROM genre WHERE id = '{$artist['genre']}'"); $genre = mysql_fetch_array($query5); #visa sidan echo "
"; $query = mysql_query("SELECT image.thumb AS thumb, image.name as imagename, user.name as username, user.id AS userid, artist.id AS artistid, artist.name as artistname FROM image JOIN (concert, artist, user) ON (image.user = user.id AND image.artist = artist.id AND image.concert = concert.id) WHERE image.concert = '{$concert['id']}' ORDER BY image.date DESC"); $loop = 0; while ($image = mysql_fetch_array($query)) { if ($loop == 4) { echo " |
"; $loop = 0; } echo "{$image['artistname']}, by {$image['username']}\" class='artist_album'>"; $loop++; } echo " |