I have a Many-to-Many table in which I entered some form information. I recently made this form dynamic, so when the value of the input elements has changed, it is sent to the database via AJAX.
So my question is:
Is it faster to try to find the values ββthat exist, edit them, create those that don't work, and delete the ones that are no longer in use OR Should I delete all the values ββfor id and insert all new ones?
In response to a comment, development.
- A form containing about 10 fields. Some of them are required, some are not. Each time you access it, it generates a random identifier.
- When the user begins to fill out the form, after the focus the element is lost, the entire form is submitted via AJAX, and all values ββthat are not empty are entered in many tables.
- The table has three fields: identifier forms , item name , item value ;
The question is rephrased: Delete all records with the required form identifier or try to find them and change them?
source
share