This topic is locked

how to realize record locking in MySQL

5/12/2005 4:02:56 AM
PHPRunner General questions
author

hi,

I would like to disable Edit / Delete when the record will be changed by

another user. So I thought I use an additional field 'is_locked' for each

table and set the status manually.
But what if the user doesn't log out then this flag is already set ?
Has anybody a better idea how to realize record locking ? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=1422&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />
regards robert

Sergey Kornilov admin 5/16/2005

Hi,
I can't guarantee you can do it using PHPRunner.

pplaut 5/18/2005

I am not sure why you are doing this, maybe I don't understand what you are trying to do here.
But, MYSQL handles record locking automatically. Also, it seems to me, that if you want to control edits, use the advanced features of PHP Runner logon screen.
Just a thought.
Peer

Sergey Kornilov admin 5/18/2005

I guess Robert is looking for some way to prevent two or more people from editing the same record simultaneously. In this situation last edit will overwrite changes made by other people.
Unfortunately there is no good way to implement this via PHP and Web browser.