prepare("SELECT archivo_path FROM marketing_assets WHERE id = ?"); $stmt->execute([$id]); $asset = $stmt->fetch(PDO::FETCH_ASSOC); if ($asset) { if (file_exists($asset['archivo_path'])) { unlink($asset['archivo_path']); } $stmt = $db->prepare("DELETE FROM marketing_assets WHERE id = ?"); $stmt->execute([$id]); } } header("Location: marketing_assets.php"); exit;