I am building an application, which I think will require transaction support. The application is written in PHP, and will use MySQL for the db. I have a "MySQL-MAX" version of MySQL, with Innodb support.
Since the application will have multiple users, possibly editing the same row at the same time, I'm guessing I will need to make use of transactions, so the edits to the records are done properly.
This is the scenario which I would like to work properly: If user-A is in record_id 1, and user-B is in record_id 1, and both are changing fields, if user-A modifies first and saves, the information on user-B's screen is now the "old" version of the data, because user-A has just made changes. Now user-B saves their changes, which would "overwrite" the data user-A had changed.
How would I avoid this scenario, using transactions? Since HTTP is stateless, this could happen quite often.
TIA...