Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I update the input of a form (rows and columns) to the database in one query ?

Status
Not open for further replies.

leifoet

Technical User
Jan 31, 2016
203
0
0
BE
An (existing) form offers the possibility via <option> to change data (presence or absence) of one person - the result is updated to the database via <input>. This works.

=> My intention is now to have a (fixed) number of people (from the database) go through the above form and then update the database with all input at once (different records and different columns).

With a <do while ... loop> I get a list with the persons and subsequent elements of each person (= retrieved from the same record of table A)

=> member name
=> the member option : either present or absent - this option can be changed in this do while listing => value = "P" or "A" (column = member)

=> partner's name
=> the partner option : either present or absent - this option can be changed in this do while listing => value = "P-part" or "A-part" (= column partner)

How can I update table A with the correct form elements (=member-presence and partner-presence) in a single update query?
My codes don't work for the combination of different rows and columns.
Thanks for tips.
 
I personally think you got no response about that question, as it's mainly not an SQL queston but a question of the programming language used for the frontend/middle tier of your application.

SQL is of minor help here, you have insert, update, and delete for single-record operations and you can use MERGE as a means to update or insert, but it's not helping you to easily send in all data and let the backend do the rest automatically. Usually the middle tier will use something like a REST API which then does thee communication with the database, so it's nothing you do directly from frontend to backend.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top