protected function buildMultipleFieldsCondition($fields, $value, $comparison, $logical)
    {
        $conditions = [];
        foreach ((array) $fields as $field) {
            $field = $this->model()->field($field);

            $fieldName = $field->mappedName();
            $conditions[] = $this->buildConditionString(
                $this->connection()->quoteIdentifier($fieldName),
                $value === null ? null : $this->bindValues($fieldName, $field->type(), $value),
                $comparison
            );

            $conditions[] = $logical;
        }

        array_pop($conditions);

        return '(' . implode(' ', $conditions) . ')';
    }
protected function buildMultipleFieldsCondition($fields, $value, $comparison, $logical)
    {
        $conditions = [];
        foreach ((array) $fields as $field) {
            $field = $this->model()->field($field);

            $fieldName = $field->mappedName();
            $conditions[] = $this->buildConditionString(
                $this->connection()->quoteIdentifier($fieldName),
                $value === null ? null : $this->bindValues($fieldName, $field->type(), $value),
                $comparison
            );

            $conditions[] = $logical;
        }

        array_pop($conditions);

        return '(' . implode(' ', $conditions) . ')';
    }
protected function buildMultipleFieldsCondition ( $ fields , $ value , $ comparison , $ logical ) { $ conditions = [ ] ; foreach ( ( array ) $ fields as $ field ) { $ field = $ this -> model ( ) -> field ( $ field ) ; $ fieldName = $ field -> mappedName ( ) ; $ conditions [ ] = $ this -> buildConditionString ( $ this -> connection ( ) -> quoteIdentifier ( $ fieldName ) , $ value === null ? null : $ this -> bindValues ( $ fieldName , $ field -> type ( ) , $ value ) , $ comparison ) ; $ conditions [ ] = $ logical ; } array_pop ( $ conditions ) ; return '(' . implode ( ' ' , $ conditions ) . ')' ; }
Builds conditions for multiple fields

@param array  $fields
@param mixed  $value
@param string $comparison
@param string $logical

@return array
Builds conditions for multiple fields