public function deleteNode( $id = null )
	{
		$node = $this->getNode( $id, MW_Tree_Manager_Abstract::LEVEL_ONE );

		$conn = $this->_dbm->acquire( $this->_dbname );

		try
		{
			$stmt = $conn->create( $this->_config['delete'] );
			$stmt->bind( 1, $node->left, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, $node->right, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->execute()->finish();

			$diff = $node->right - $node->left + 1;

			$stmt = $conn->create( $this->_config['move-left'] );
			$stmt->bind( 1, -$diff, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, 0, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 3, $node->right + 1, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 4, 0x7FFFFFFF, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->execute()->finish();

			$stmt = $conn->create( $this->_config['move-right'] );
			$stmt->bind( 1, -$diff, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, $node->right + 1, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 3, 0x7FFFFFFF, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->execute()->finish();

			$this->_dbm->release( $conn, $this->_dbname );
		}
		catch( Exception $e )
		{
			$this->_dbm->release( $conn, $this->_dbname );
			throw $e;
		}
	}
public function deleteNode( $id = null )
	{
		$node = $this->getNode( $id, MW_Tree_Manager_Abstract::LEVEL_ONE );

		$conn = $this->_dbm->acquire( $this->_dbname );

		try
		{
			$stmt = $conn->create( $this->_config['delete'] );
			$stmt->bind( 1, $node->left, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, $node->right, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->execute()->finish();

			$diff = $node->right - $node->left + 1;

			$stmt = $conn->create( $this->_config['move-left'] );
			$stmt->bind( 1, -$diff, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, 0, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 3, $node->right + 1, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 4, 0x7FFFFFFF, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->execute()->finish();

			$stmt = $conn->create( $this->_config['move-right'] );
			$stmt->bind( 1, -$diff, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, $node->right + 1, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 3, 0x7FFFFFFF, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->execute()->finish();

			$this->_dbm->release( $conn, $this->_dbname );
		}
		catch( Exception $e )
		{
			$this->_dbm->release( $conn, $this->_dbname );
			throw $e;
		}
	}
public function deleteNode ( $ id = null ) { $ node = $ this -> getNode ( $ id , MW_Tree_Manager_Abstract :: LEVEL_ONE ) ; $ conn = $ this -> _dbm -> acquire ( $ this -> _dbname ) ; try { $ stmt = $ conn -> create ( $ this -> _config [ 'delete' ] ) ; $ stmt -> bind ( 1 , $ node -> left , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> bind ( 2 , $ node -> right , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> execute ( ) -> finish ( ) ; $ diff = $ node -> right - $ node -> left + 1 ; $ stmt = $ conn -> create ( $ this -> _config [ 'move-left' ] ) ; $ stmt -> bind ( 1 , - $ diff , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> bind ( 2 , 0 , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> bind ( 3 , $ node -> right + 1 , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> bind ( 4 , 0x7FFFFFFF , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> execute ( ) -> finish ( ) ; $ stmt = $ conn -> create ( $ this -> _config [ 'move-right' ] ) ; $ stmt -> bind ( 1 , - $ diff , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> bind ( 2 , $ node -> right + 1 , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> bind ( 3 , 0x7FFFFFFF , MW_DB_Statement_Abstract :: PARAM_INT ) ; $ stmt -> execute ( ) -> finish ( ) ; $ this -> _dbm -> release ( $ conn , $ this -> _dbname ) ; } catch ( Exception $ e ) { $ this -> _dbm -> release ( $ conn , $ this -> _dbname ) ; throw $ e ; } }
Deletes a node and its descendants from the storage.

@param integer|null $id Delete the node with the ID and all nodes below
Deletes a node and its descendants from the storage .