PHP/mySQL website to allow multiple user editting records facility.
Each record has 'status' '0'=awaiting edit;'1'=being editted;'2'=don e
PHP makes mySQL query
[CODE=mysql]SELECT * FROM table WHERE status=0;[/CODE]
Then needs to quickly update status of this record to '1' to prevent someone else getting it.
Or should it be [CODE=mysql]UPDATE table WHERE status=0 set status=1;[/CODE]
But then how do I get the record data ?
Does it really need a LOCK table before the SELECT & UPDATE then UNLOCK table ?
Each record has 'status' '0'=awaiting edit;'1'=being editted;'2'=don e
PHP makes mySQL query
[CODE=mysql]SELECT * FROM table WHERE status=0;[/CODE]
Then needs to quickly update status of this record to '1' to prevent someone else getting it.
Or should it be [CODE=mysql]UPDATE table WHERE status=0 set status=1;[/CODE]
But then how do I get the record data ?
Does it really need a LOCK table before the SELECT & UPDATE then UNLOCK table ?
Comment