beginTransaction(); // output_extra update $sql2 = "UPDATE $DB.$tablename_sub SET accountDate=?, accountList=?, ET_unapproved=?, ET_total=? WHERE parent_num = ? "; $stmh2 = $pdo->prepare($sql2); $stmh2->execute([ $accountDate, json_encode($accountList_jsondata), intval(str_replace(',', '', $ET_unapproved)), intval(str_replace(',', '', $ET_total)), $num ]); $pdo->commit(); $data = [ 'num' => $num ]; 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()]); } ?>