title: (CRUD) How to know which database records to target from html rows
body: <p>Been googling and trying all kinds of things but still can't figure it out.</p>
  <p>Suppose i have a html form which has a table with lines (and input fields) in it. The lines have been populated by database (mysql) data. It is a journal with journal lines.</p>
  <p>When the user changes one or more values of certain table rows and afterwards presses the save button, i want  to only change the affected rows in the database.</p>
  <p>Have been using delete * from table for a while now and then re-inserting all table rows. Crude, but for now it works. (but the autoincrement ID goes up fast and dependant rows in other tables sometimes raise problems)</p>
  <p>The whole problem is that i dislike the idea of sending the record's ID to the client and sending it back when the save button has been pressed. Amongst other thoughts, i don't think an internal SQL ID belongs in the client.</p>
  <p>There's got to be another way and someone else must've done this before, right?</p>
  <p>Sure you can do things like keeping track of changes in the client, using UUIDs (insert them in the table and send that as the temp ID in the client) or keep a line number both in the client and in the table. But it takes a lot of work and feels either slow(er) or cumbersome.</p>
  <p>And sure it gets even worse when you let the user add or delete rows to the html table and process changes those in the database</p>
  <p>Does anyone have any pointers for me? I would be most grateful.</p>