I have a table that stores ranges (start, end). Every time the program gets the max(end), adds count to it, and writes back a new range (max(end), max(end) + count).
If I ran more than 1 instance of that program, it's possible that 2 of them will get and write back the same data.
I need your advices on table locking. Program is written on php.
How is this different from an auto increment column? Sounds like you're duplicating functionality that your database already has.
Yes, isolation is an issue. That's something that your application needs to sort out. I'd recommend reading more about PHP database isolation.