当前位置:网站首页>How to implicitly pass values when transferring forms
How to implicitly pass values when transferring forms
2022-07-04 16:45:00 【Struggling young man】
When the form is transferred , How to implicitly pass the value .
Case description
- When modifying form elements , When you click the Modify button , Need to send out get request , So that it can be displayed in the form that pops up later ( Good user experience ).
- The request from the foreground to the backend is get request , And pass it to a value id Used to query the corresponding tables in the database ,id For all fields of this value and return to the foreground , The foreground will render the required fields to the page .
- When the user makes modifications in the pop-up box , Then submit the data to the background interface , After the background interface receives the data , Execute database statement , Complete data update .
difficulty
The problem to be solved appears in the second step , That is, data modification , And send the data back to the background . And here comes the question , How does the database know which data you want to modify ? Your pop-up box form What the form submits is only the modified value , Not given id ah .
This is the time , In the first step , We have found all the attributes in the data , Why not send a message id Well ?
what ? You said you didn't want users to modify id( Primary key )? Oh , It's easy to do . We can add another label to the form , And the value is preset , That is, you need to modify the database corresponding to that data id( Primary key ), But we don't show it to users , We hide it . Ah , Just play !
When submitting data at this time , There is id( Primary key ) 了 , Problem solving .
Here is a solution for you , If there is a better way , Welcome to leave a message .
边栏推荐
- 同构图与异构图CYPHER-TASK设计与TASK锁机制
- Accounting regulations and professional ethics [9]
- C# 实现 FFT 正反变换 和 频域滤波
- 线程池的使用和原理
- Hidden communication tunnel technology: intranet penetration tool NPS
- Recommend 10 excellent mongodb GUI tools
- ECCV 2022放榜了:1629篇论文中选,录用率不到20%
- Model fusion -- stacking principle and Implementation
- Market trend report, technical innovation and market forecast of taillight components in China
- Communication mode based on stm32f1 single chip microcomputer
猜你喜欢

Transformer中position encoding实践

error: ‘connect‘ was not declared in this scope connect(timer, SIGNAL(timeout()), this, SLOT(up
![[tutorial] yolov5_ DeepSort_ The whole process of pytoch target tracking and detection](/img/a7/92d670776e3fd3d5add3aa144617c7.jpg)
[tutorial] yolov5_ DeepSort_ The whole process of pytoch target tracking and detection

Understand the rate control mode rate control mode CBR, VBR, CRF (x264, x265, VPX)

Anta is actually a technology company? These operations fool netizens

Model fusion -- stacking principle and Implementation

DC-2靶场搭建及渗透实战详细过程(DC靶场系列)

Will the memory of ParticleSystem be affected by maxparticles
![[North Asia data recovery] a database data recovery case where the disk on which the database is located is unrecognized due to the RAID disk failure of HP DL380 server](/img/79/3fab19045e1ab2f5163033afaa4309.jpg)
[North Asia data recovery] a database data recovery case where the disk on which the database is located is unrecognized due to the RAID disk failure of HP DL380 server

科普达人丨一文看懂阿里云的秘密武器“神龙架构”
随机推荐
Research Report on market supply and demand and strategy of China's well completion equipment industry
CMPSC311 Linear Device
Software Engineer vs Hardware Engineer
L1-072 scratch lottery
Principle and general steps of SQL injection
Accounting regulations and professional ethics [8]
js中的数组筛选fliter
Will the memory of ParticleSystem be affected by maxparticles
JS to realize the countdown function
Statistical learning: logistic regression and cross entropy loss (pytoch Implementation)
A trap used by combinelatest and a debouncetime based solution
Penetration test --- database security: detailed explanation of SQL injection into database principle
What should ABAP do when it calls a third-party API and encounters garbled code?
China's plastic processing machinery market trend report, technological innovation and market forecast
Accounting regulations and professional ethics [6]
Use and principle of thread pool
Transformer中position encoding实践
Hair growth shampoo industry Research Report - market status analysis and development prospect forecast
Talking about Net core how to use efcore to inject multiple instances of a context annotation type for connecting to the master-slave database
Research Report of exoskeleton robot industry - market status analysis and development prospect prediction