I am working on a multi-user web based project which will assign a consecutive number to an order.
I have been using a database auto-increment field to get a guaranteed consecutive number. It works well, but I have some questions:
What happens if two users submit at exactly the same nano-second. How would the server react?
Is there a better way to acheive this? Could the server itself generate a consecutive number?
I have been using a database auto-increment field to get a guaranteed consecutive number. It works well, but I have some questions:
What happens if two users submit at exactly the same nano-second. How would the server react?
Is there a better way to acheive this? Could the server itself generate a consecutive number?