getConnection(); $idquotations = $_GET['idquotations'] ?? null; if (!$idquotations) { echo json_encode(['success' => false, 'message' => 'ID quotations mancante']); exit; } try { $stmt = $pdo->prepare("SELECT id, idquotations, part_number, part_description FROM identification_parts WHERE idquotations = :idquotations ORDER BY part_number ASC"); $stmt->execute([':idquotations' => $idquotations]); $parts = $stmt->fetchAll(); echo json_encode(['success' => true, 'parts' => $parts]); } catch (PDOException $e) { echo json_encode(['success' => false, 'message' => 'Errore nel caricamento: ' . $e->getMessage()]); }