This topic is locked

Record Locking

12/23/2009 6:30:45 PM
PHPRunner General questions
T
Tempus_Erus author

Hi,
I am looking to lock a record to prevent 2 user editing the same record.
I can check and set fields for value to determine if record is being edited, however if a user does not exit correctly the record remains locked.
I assume a time stamp of some kind but do not know where to start.
Any ideas welcome.
Thx in advance.

Sergey Kornilov admin 12/23/2009

Use 'Record locking' feature in PHPRunner 5.2.

N
nix386 12/23/2009



Use 'Record locking' feature in PHPRunner 5.2.


Hi Sergey, is there any way to use the code in 5.2 for record locking in 5.1? I'm not wanting to migrate my project to 5.2 but would like to use record locking.
Cheers, Nick

Sergey Kornilov admin 12/24/2009

There is an article that explains how to do this in PHPRunner 5.1:

http://www.xlinesoft.com/phprunner/docs/implement_record_locking.htm

T
Tempus_Erus author 12/24/2009



There is an article that explains how to do this in PHPRunner 5.1:

http://www.xlinesoft.com/phprunner/docs/implement_record_locking.htm


Would 5.1 run on previous versions of PHPRunner?

J
Jane 12/24/2009

I'm not sure that I understand your question. Please re-phrase it.

N
nix386 12/28/2009



There is an article that explains how to do this in PHPRunner 5.1:

http://www.xlinesoft.com/phprunner/docs/implement_record_locking.htm


For some reason my project generates this error.
Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in D:\WAMP\www\include\customer_table_events.php on line 466
I got snagged last time I tried this so I assumed that it was maybe an old article so any ideas?
I don't have any other code in the BeforeEdit and BeforeShowEdit.
Ok this is the problem line.. echo "<script>alert(\"This record is in use by <?php echo $datatmp["UserName"]?>\")</script>";

J
Jane 12/28/2009

Hi,
try to use this line:

echo "<script>alert(\"This record is in use by <?php echo ".$datatmp["UserField"]."?>\")</script>";