'Language Reference'
User Functions
Database Functions
showdbs
createdb
dropdb
renamedb
isLocked
lockdb
unlockdb
selectdb
db_exists
Data Manipulation Functions
Table Functions
Error Handling Functions
|
Usage |
void lockDB ( $database ) |
Purpose |
To place a file lock on disk to prevent further writing to the database |
Availability |
txtSQL >= 2.2.0 Beta |
This function will return TRUE if $database was successfully locked and FALSE otherwise. A file lock is basically a file created that tells txtSQL that it is locked.
Example 12: locked()
| Copy to Clipboard |
<?php
if ( $sql->lockdb('testDB') )
{
print 'testDB is locked';
}
else
{
print 'testDB could not be locked, txtSQL said: '.$sql->get_last_error();
}
?>
|
User-Contributed Comments for: lockdb() |
|
No comments found; |
|