{$artist['name']}
"; if ($user->loggedin) { echo "Add this artist to your favorites list"; } echo "Country | {$artist['country']} | |
Genre | {$artist['genre']} |
#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('artists', true); if (isset($_GET['artist']) && !empty($_GET['artist'])) { #hämta artist $query1 = mysql_query("SELECT artist.id AS id, artist.name AS name, country.name AS country, genre.name AS genre FROM artist JOIN (country, genre) ON (artist.country = country.id AND artist.genre = genre.id) WHERE artist.id = '{$_GET['artist']}'"); $artist = mysql_fetch_array($query1); $query2 = mysql_query("SELECT * FROM concert WHERE artist = '{$artist['id']}' ORDER BY date DESC"); #visa sidan echo "
Country | {$artist['country']} | |
Genre | {$artist['genre']} |
"; $loop = 0; $query = mysql_query("SELECT image.thumb AS thumb, image.name as imagename, user.name as username, user.id AS userid, concert.id AS concertid, city.name as city, country.name AS country FROM image JOIN (concert, artist, user, country, city) ON (image.user = user.id AND image.artist = artist.id AND image.concert = concert.id AND concert.city = city.id AND city.country = country.id) WHERE image.artist = '{$artist['id']}' ORDER BY image.date DESC"); while ($image = mysql_fetch_array($query)) { if ($loop == 4) { echo " |
"; $loop = 0; } echo "{$image['city']} - {$image['country']}, by {$image['username']}\" class='artist_album'>"; $loop++; } echo " |