<?php
require_once( "DB.php" );
require_once( "Command.php" );
require_once( "LockTableCmd.php" );
require_once( "settings.php" );
class UnlockTableCmd extends Command
{
function Execute( )
{
// connect to the db
$db = DB::connect( $GLOBALS['g_PearDBDSN'] );
if (DB::isError( $db ))
{
// let everyone know there was a problem
$this->OnError("Failed to connect to the database using " . $GLOBALS['g_PearDBDSN']);
// return error
return CMD_ERROR;
}
// try to unlock
$result = $db->Query( "UNLOCK TABLES" );
if (DB::isError( $result ))
{
// let everyone know there was a problem
$this->OnError("Failed to unlock the tables");
// return error
return CMD_ERRROR;
}
// this command is finished
return CMD_FINISHED;
}
}
?>
<?php
require_once("DB.php");
require_once("Command.php");
require_once("LockTableCmd.php");
require_once("settings.php");
class UnlockTableCmd extends Command
{
function Execute()
{
// connect to the db
$db= DB::connect($GLOBALS['g_PearDBDSN']);
if(DB::isError($db))
{
// let everyone know there was a problem
$this->OnError("Failed to connect to the database using ".$GLOBALS['g_PearDBDSN']);