protected function _deleteItems( array $ids, $sql, $siteidcheck = true, $name = 'id' )
	{
		if( empty( $ids ) ) { return; }

		$context = $this->_getContext();
		$dbname = $this->_getResourceName();

		$search = $this->createSearch();
		$search->setConditions( $search->compare( '==', $name, $ids ) );

		$types = array( $name => MW_DB_Statement_Abstract::PARAM_STR );
		$translations = array( $name => '"' . $name . '"' );

		$cond = $search->getConditionString( $types, $translations );
		$sql = str_replace( ':cond', $cond, $sql );

		$dbm = $context->getDatabaseManager();
		$conn = $dbm->acquire( $dbname );

		try
		{
			$stmt = $conn->create( $sql );

			if( $siteidcheck ) {
				$stmt->bind( 1, $context->getLocale()->getSiteId(), MW_DB_Statement_Abstract::PARAM_INT );
			}

			$stmt->execute()->finish();

			$dbm->release( $conn, $dbname );
		}
		catch( Exception $e )
		{
			$dbm->release( $conn, $dbname );
			throw $e;
		}
	}
protected function _deleteItems( array $ids, $sql, $siteidcheck = true, $name = 'id' )
	{
		if( empty( $ids ) ) { return; }

		$context = $this->_getContext();
		$dbname = $this->_getResourceName();

		$search = $this->createSearch();
		$search->setConditions( $search->compare( '==', $name, $ids ) );

		$types = array( $name => MW_DB_Statement_Abstract::PARAM_STR );
		$translations = array( $name => '"' . $name . '"' );

		$cond = $search->getConditionString( $types, $translations );
		$sql = str_replace( ':cond', $cond, $sql );

		$dbm = $context->getDatabaseManager();
		$conn = $dbm->acquire( $dbname );

		try
		{
			$stmt = $conn->create( $sql );

			if( $siteidcheck ) {
				$stmt->bind( 1, $context->getLocale()->getSiteId(), MW_DB_Statement_Abstract::PARAM_INT );
			}

			$stmt->execute()->finish();

			$dbm->release( $conn, $dbname );
		}
		catch( Exception $e )
		{
			$dbm->release( $conn, $dbname );
			throw $e;
		}
	}
protected function _deleteItems ( array $ ids , $ sql , $ siteidcheck = true , $ name = 'id' ) { if ( empty ( $ ids ) ) { return ; } $ context = $ this -> _getContext ( ) ; $ dbname = $ this -> _getResourceName ( ) ; $ search = $ this -> createSearch ( ) ; $ search -> setConditions ( $ search -> compare ( '==' , $ name , $ ids ) ) ; $ types = array ( $ name => MW_DB_Statement_Abstract :: PARAM_STR ) ; $ translations = array ( $ name => '"' . $ name . '"' ) ; $ cond = $ search -> getConditionString ( $ types , $ translations ) ; $ sql = str_replace ( ':cond' , $ cond , $ sql ) ; $ dbm = $ context -> getDatabaseManager ( ) ; $ conn = $ dbm -> acquire ( $ dbname ) ; try { $ stmt = $ conn -> create ( $ sql ) ; if ( $ siteidcheck ) { $ stmt -> bind ( 1 , $ context -> getLocale ( ) -> getSiteId ( ) , MW_DB_Statement_Abstract :: PARAM_INT ) ; } $ stmt -> execute ( ) -> finish ( ) ; $ dbm -> release ( $ conn , $ dbname ) ; } catch ( Exception $ e ) { $ dbm -> release ( $ conn , $ dbname ) ; throw $ e ; } }
Deletes items specified by its IDs.

@param array $ids List of IDs
@param string $sql SQL statement
@param boolean $siteidcheck If siteid should be used in the statement
@param string $name Name of the ID column
Deletes items specified by its IDs .