0
I have a PHP application that receives json from another application and writes them to the Mysql database. Before recording the data, I check the database to see if the record has already been previously recorded. However, when I check the database this afternoon, I come across two identical records. What could have happened? Was the client application so fast and before the first was recorded in the bank the second was also being processed? How can I protect myself from that? My Apache configuration is default.
Thank you very much.
Good observation. Now that you spoke, I called in to leave only the registration number. I put the id and forgot the number. About the transaction I didn’t really know I could use with a select and an Insert. Currently I use only in Insert because I write in more than one table. Tomorrow I will complete it early.
– Tulio F. Polachini