I am creating user detail table in MySQL where user details are stored when user submits registration form.
In my user table user id field is primary key and auto increment.
My application should be used by many users from many locations. Now there is one scenario when it is possible that two user clicks on submit button at same time from anywhere. My primary key is of integer type and has length of 15, but when two user clicks at same time then which user should get first next id. Or it is possible that none of that get registered and get error.
so what can i do in this case