Home    Back    Forward    Refresh    txtSQL Homepage

lockdb
Purpose: To place a file lock on disk to prevent further writing to the database
txtSQL >= 2.2.0 Beta
void lockDB ( $database )

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 Comments - lockdb
No comments posted yet;
Last Page Next Page

'Language Reference'

User Functions

Database Functions
  • showdbs
  • createdb
  • dropdb
  • renamedb
  • isLocked
  • lockdb
  • unlockdb
  • selectdb
  • db_exists

    Data Manipulation Functions

    Table Functions

    Error Handling Functions

    SQL Syntax

  • [ txtSQL Documentation powered by txtSQL | 6 SQL Queries ]