Simultaneous select/update/insert

Posted on 16th Feb 2014 by admin

Hi

How would I need to go about when 2 users update a single row simultaneous? And how would I need to go about when 2 users want to edit a row?

Should I first lock the table, update the row to indicate who is editing the data unlocking the table and selecting the row where the editor_id = the current user_id? Plus what happens when I lock the table do other users get a failed query? and what errno does mysql return in this case?

Do I need to use not null on required fields or should I leave it out?

Other forums