Say a PHP script appends some text to an already existing data in a MySQL database. Say the existing data is abc
. Now one user wants to append 123
and another wants to append xyz
. Both of them run the script at the same time. Whose will be appended first? Will the final result be abc123xyz
or abcxyz123
?
At a worse case, say the script first takes the data, appends the given text to it, and then replaces the old data in the database. Then whose change will 'survive' here? Will the result be abc123
or abcxyz
?
Sorry if it has been asked before.