title: On opening database record, do not allow to change record by other users (PHP+MySQL)
body: <p>I am working on a custom MVC application. </p>
  
  <p>Its an ERP system where we need to set restriction that if a record is opened by admin1 then other user (admin2) can view but cannot change the record. </p>
  
  <p>I have read about locking table and about transactions but didn't get much cleared idea.</p>
  
  <p>Can someone give exact idea with some sample code.</p>
  
  <p>Thanks</p>