src/DB/PDO/Table.php
public function removeByIndex( $key, $value ){
		$this->table->focusIndex( $key, $value );
		$number	= 0;
		$rows	= $this->table->get( FALSE );
		if( count( $rows ) ){
			$number = $this->table->delete();
			foreach( $rows as $row ){
				switch( $this->fetchMode ){
					case \PDO::FETCH_CLASS:
					case \PDO::FETCH_OBJ:
						$id	= $row->{$this->primaryKey};
						break;
					default:
						$id	= $row[$this->primaryKey];
				}
				$this->cache->remove( $this->cacheKey.$id );
			}
			$result	= TRUE;
		}
		$this->table->defocus();
		return $number;
	}
public function removeByIndex( $key, $value ){
		$this->table->focusIndex( $key, $value );
		$number	= 0;
		$rows	= $this->table->get( FALSE );
		if( count( $rows ) ){
			$number = $this->table->delete();
			foreach( $rows as $row ){
				switch( $this->fetchMode ){
					case \PDO::FETCH_CLASS:
					case \PDO::FETCH_OBJ:
						$id	= $row->{$this->primaryKey};
						break;
					default:
						$id	= $row[$this->primaryKey];
				}
				$this->cache->remove( $this->cacheKey.$id );
			}
			$result	= TRUE;
		}
		$this->table->defocus();
		return $number;
	}
public function removeByIndex ( $ key , $ value ) { $ this -> table -> focusIndex ( $ key , $ value ) ; $ number = 0 ; $ rows = $ this -> table -> get ( FALSE ) ; if ( count ( $ rows ) ) { $ number = $ this -> table -> delete ( ) ; foreach ( $ rows as $ row ) { switch ( $ this -> fetchMode ) { case \ PDO :: FETCH_CLASS : case \ PDO :: FETCH_OBJ : $ id = $ row -> { $ this -> primaryKey } ; break ; default : $ id = $ row [ $ this -> primaryKey ] ; } $ this -> cache -> remove ( $ this -> cacheKey . $ id ) ; } $ result = TRUE ; } $ this -> table -> defocus ( ) ; return $ number ; }
Removes entries selected by index.
@access		public
@param		string			$key			Key of Index
@param		string			$value			Value of Index
@return		boolean
Removes entries selected by index .