I have a problem when submitting a form, when the data is sent to create in the database, if 2 requests arrive at the same time 2 records are created with the same code, there is a column (not the primary key, not auto-incrementing) formed by characters and numbers and each time a record is created the id is increased.
I am using php and mysql,it is very unlikely that it will happen but it has happened, how could I avoid this? Thank you