public function delete(array $options=array()) {
		$options += self::$deleteDefaults;
		if( empty($options['table']) ) {
			throw new Exception('Empty table option');
		}
		$OPTIONS	= '';
		$OPTIONS	.= (!empty($options['lowpriority'])) ? ' LOW_PRIORITY' : '';
		$OPTIONS	.= (!empty($options['quick'])) ? ' QUICK' : '';
		$OPTIONS	.= (!empty($options['ignore'])) ? ' IGNORE' : '';
		$WC			= ( !empty($options['where']) ) ? 'WHERE '.$options['where'] : '';
		$ORDERBY	= ( !empty($options['orderby']) ) ? 'ORDER BY '.$options['orderby'] : '';
		$LIMIT		= ( $options['number'] > 0 ) ? 'LIMIT '.
			( ($options['offset'] > 0) ? $options['offset'].', ' : '' ).$options['number'] : '';
		$TABLE		= static::escapeIdentifier($options['table']);
		
		$QUERY		= "DELETE {$OPTIONS} FROM {$TABLE} {$WC} {$ORDERBY} {$LIMIT}";
		if( $options['output'] == static::SQLQUERY ) {
			return $QUERY;
		}
		return $this->query($QUERY, PDOEXEC);
	}
public function delete(array $options=array()) {
		$options += self::$deleteDefaults;
		if( empty($options['table']) ) {
			throw new Exception('Empty table option');
		}
		$OPTIONS	= '';
		$OPTIONS	.= (!empty($options['lowpriority'])) ? ' LOW_PRIORITY' : '';
		$OPTIONS	.= (!empty($options['quick'])) ? ' QUICK' : '';
		$OPTIONS	.= (!empty($options['ignore'])) ? ' IGNORE' : '';
		$WC			= ( !empty($options['where']) ) ? 'WHERE '.$options['where'] : '';
		$ORDERBY	= ( !empty($options['orderby']) ) ? 'ORDER BY '.$options['orderby'] : '';
		$LIMIT		= ( $options['number'] > 0 ) ? 'LIMIT '.
			( ($options['offset'] > 0) ? $options['offset'].', ' : '' ).$options['number'] : '';
		$TABLE		= static::escapeIdentifier($options['table']);
		
		$QUERY		= "DELETE {$OPTIONS} FROM {$TABLE} {$WC} {$ORDERBY} {$LIMIT}";
		if( $options['output'] == static::SQLQUERY ) {
			return $QUERY;
		}
		return $this->query($QUERY, PDOEXEC);
	}
public function delete ( array $ options = array ( ) ) { $ options += self :: $ deleteDefaults ; if ( empty ( $ options [ 'table' ] ) ) { throw new Exception ( 'Empty table option' ) ; } $ OPTIONS = '' ; $ OPTIONS .= ( ! empty ( $ options [ 'lowpriority' ] ) ) ? ' LOW_PRIORITY' : '' ; $ OPTIONS .= ( ! empty ( $ options [ 'quick' ] ) ) ? ' QUICK' : '' ; $ OPTIONS .= ( ! empty ( $ options [ 'ignore' ] ) ) ? ' IGNORE' : '' ; $ WC = ( ! empty ( $ options [ 'where' ] ) ) ? 'WHERE ' . $ options [ 'where' ] : '' ; $ ORDERBY = ( ! empty ( $ options [ 'orderby' ] ) ) ? 'ORDER BY ' . $ options [ 'orderby' ] : '' ; $ LIMIT = ( $ options [ 'number' ] > 0 ) ? 'LIMIT ' . ( ( $ options [ 'offset' ] > 0 ) ? $ options [ 'offset' ] . ', ' : '' ) . $ options [ 'number' ] : '' ; $ TABLE = static :: escapeIdentifier ( $ options [ 'table' ] ) ; $ QUERY = "DELETE {$OPTIONS} FROM {$TABLE} {$WC} {$ORDERBY} {$LIMIT}" ; if ( $ options [ 'output' ] == static :: SQLQUERY ) { return $ QUERY ; } return $ this -> query ( $ QUERY , PDOEXEC ) ; }
Delete something in database

@param array $options The options used to build the query.
@return int The number of deleted rows.

It parses the query from an array to a DELETE query.
Delete something in database