prepare("SELECT * FROM installations WHERE id = ?"); $stmt->execute([$id]); $installation = $stmt->fetch(PDO::FETCH_ASSOC); if (!$installation) { $_SESSION['message'] = 'Instalação não encontrada.'; $_SESSION['message_type'] = 'danger'; header("Location: index.php"); exit; } // Fetch images for this installation $img_stmt = $pdo->prepare("SELECT * FROM installation_images WHERE installation_id = ?"); $img_stmt->execute([$id]); $images = $img_stmt->fetchAll(PDO::FETCH_ASSOC); ?>