Databases: Mysql Locker
Craig Manley (contact me)
This class can safely manage the locking and unlocking of MySQL tables.
The table locks are created when an object of the class is created, and are automatically released when the object is destroyed.
The table unlocking occurs when the object is no longer referenced, or when it goes out of scope. The latter also occurs when a PHP script dies or when an exception occurs. This is where this class is most useful because it will make sure that all existing locks are automatically released even when using persistent connections.
The class takes advantage of PHP 5 class destructor support to make sure that the unlocking of any locked tables always happen.
Click here for detailed information about this class on phpclasses.org