I'm working on a project using a MySQL database as the back-end (accessed from PHP). Sometimes, I select a row, do some operations on it, and then update the record in the database.
I am worried that another user could have initiated a similar process on the same row right after the first select, and his changes could overwrite some of the changes the first user did (because the second user's select did not yet include those changes).
Is this an actual problem? Should I lock the table, and won't this severely impact my application's performance? Any other solutions?
Just to be thorough with my information, I also have some CRON jobs running that could also be modifying the same data.
Thanks!