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;
		}
	}