0) { $sql->set( "UPDATE buildings SET name = ?, location_id = ?, comment = ? WHERE id = ?", "sisi", [$name, $locationId, $comment, $buildingId] ); } else { $sql->set( "INSERT INTO buildings (name, location_id, comment) VALUES (?, ?, ?)", "sis", [$name, $locationId, $comment] ); } $_SESSION['success'] = "Gebäude gespeichert"; header('Location: ?module=buildings&action=list'); exit;