I have a php script that check for a particular unique entry in the table. If the entry doesn't exist it create a new row for that data otherwise it just update the count for that entry. My script can be hit at the same time (at same second). In this case, both instance of the script check together and don't find entry and try to insert record. The second instance raise error in that case.
Is there any way to prevent that.
Using the method mentioned in this question will be helpful ?