false]; if ($num && $tablename && $lotDone) { try { $pdo->beginTransaction(); $sql = "UPDATE $DB.$tablename SET lotDone = ? WHERE num = ? LIMIT 1"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $lotDone, PDO::PARAM_STR); $stmh->bindValue(2, $num, PDO::PARAM_INT); $stmh->execute(); $pdo->commit(); $response['success'] = true; } catch (PDOException $Exception) { $pdo->rollBack(); $response['error'] = $Exception->getMessage(); } } else { $response['error'] = '잘못된 요청입니다.'; } // JSON 응답 반환 echo json_encode($response, JSON_UNESCAPED_UNICODE); ?>