0) { $insertStatement = $db->prepare(" INSERT INTO lieder (cd_id, track, titel) VALUES (:cd_id, :track, :titel) "); $insertStatement->execute([ 'cd_id' => $_GET['id'], 'track' => $_POST['track'], 'titel' => $_POST['titel'], ]); header('Location: cd.php?id=' . htmlspecialchars($_GET['id'])); exit; } $db = holeDatenbankVerbindung(); $cdStatement = $db->prepare(" SELECT c.id, c.name AS cdname, c.erscheinungsjahr, k.name AS kuenstlername FROM cds AS c LEFT JOIN kuenstler AS k ON c.kuenstler_id = k.id WHERE c.id = :cd_id "); $cdStatement->execute(['cd_id' => $_GET['id']]); $cd = $cdStatement->fetch(PDO::FETCH_ASSOC); $liederStatement = $db->prepare("SELECT * FROM lieder WHERE cd_id = :cd_id ORDER BY track ASC"); $liederStatement->execute(['cd_id' => $_GET['id']]); $lieder = $liederStatement->fetchAll(PDO::FETCH_ASSOC); ?> Mediathek

(, )

Track Titel
Bearbeiten ... Löschen ...

zur Übersicht