Re: Checking the status of a field, and ensuring it is not updated before I change it

2004-11-11 Thread SGreen
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.

Re: Checking the status of a field, and ensuring it is not updated before I change it

2004-11-11 Thread gerald_clark
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

Checking the status of a field, and ensuring it is not updated before I change it

2004-11-11 Thread Joshua Beall
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