I am uncertain how to ask this concisely, so I will explain it through situational-context.

User-A decides he wants to modify a MySQL-row via an HTML-form. Simultaneously, User-B decides he also wants to modify the same MySQL-row in the same way.

We will say the MySQL-row is a text-field which contains the text, 'Can\'t touch this'

The two users have no knowledge of eachothers intentions.

User-A makes a significant change to the MySQL-row and saves it to the database. The MySQL-row becomes 'Can\'t touch this was a popular track by the Hip-Hop artist M.C. Hammer.'

User-B makes a minor-change to the MySQL-row and saves it to the database. The MySQL-row becomes 'Cannot touch this. Please avoid contractions.'

Because User-B decided to modify the MySQL-row before User-A finished his modification, the Modification User-A made gets overwritten by the modification made by User-B.

How do scripts which allow simultaneous editing of database-rows (such as MediaWiki, or any other wiki-software) deal with this?

Edit
Report