If your table is MyISAM you will have to lock the table so that no other
process can access that row (or any other) while you do your check and
update.
http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html
If your table is InnoDb you can still do the table lock or you can lock
just the one row.
Joshua Beall wrote:
Hi All,
I have the following situation: I want to check a row in a database (list of
jobs that need to be run). So, my script checks the status field, and if it
is not started, then it marks it as locked and running, and when it
finishes, it marks it as completed.
Now, here is
Hi All,
I have the following situation: I want to check a row in a database (list of
jobs that need to be run). So, my script checks the status field, and if it
is not started, then it marks it as locked and running, and when it
finishes, it marks it as completed.
Now, here is what I am concerne