prepare($sql); $stmh->bindParam(':estimateId', $estimateId, PDO::PARAM_INT); $stmh->execute(); $estimateDetails = $stmh->fetchAll(PDO::FETCH_ASSOC); // 데이터를 JSON 형식으로 반환 header('Content-Type: application/json'); echo json_encode($estimateDetails); } catch (PDOException $e) { echo json_encode(['error' => '데이터를 가져오는 중 오류가 발생했습니다: ' . $e->getMessage()]); } ?>