Let's say I do the following:
$favorite = Mage::getModel('testing/favorites')->load(4);
.....
$favorite->save();
How do I make sure the row 4 has been locked and can't be accessed until I call save()?
Edit:
Essentially, I have one table with a column (not id column, not autoincrement) that is a counter, which increments every time a call is made to a function. If two people access this row concurrently, how can I make sure the value is +2 at the end, and not +1?
For example: User A and B call
incrementAction(4);
If the row 4 has a favorite_count = 500, it should, by the end, have a value of 502. The +1 from user A, and the +1 from user B, rather than each incrementing 500 for each +1 and ending up with 501 when each of them calls save().