beginTransaction(); $sql = "UPDATE $DB.$tablename SET estimateList=? WHERE num=? LIMIT 1"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1, json_encode($estimate_jsondata), PDO::PARAM_STR); $stmh->bindValue(2, $num, PDO::PARAM_STR); $stmh->execute(); $pdo->commit(); // 성공적으로 작업이 완료된 후 반환할 데이터 $data = [ 'num' => $num, 'mode' => $mode, 'is_deleted' => isset($is_deleted) ? $is_deleted : 0 ]; echo json_encode($data, JSON_UNESCAPED_UNICODE); } catch (PDOException $Exception) { error_log("오류: " . $Exception->getMessage()); http_response_code(500); echo json_encode(['error' => $Exception->getMessage()]); } catch (Exception $e) { error_log("오류: " . $e->getMessage()); http_response_code(500); echo json_encode(['error' => $e->getMessage()]); } ?>