A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.yiiframework.com/doc/api/2.0/yii-db-conditions-betweencolumnscondition below:

BetweenColumnsCondition, yii\db\conditions\BetweenColumnsCondition | API Documentation for Yii 2.0

Class yii\db\conditions\BetweenColumnsCondition

Class BetweenColumnCondition represents a BETWEEN condition where values is between two columns. For example:

new BetweenColumnsCondition(42, 'BETWEEN', 'min_value', 'max_value')


And a more complex example:

new BetweenColumnsCondition(
   new Expression('NOW()'),
   'NOT BETWEEN',
   (new Query)->select('time')->from('log')->orderBy('id ASC')->limit(1),
   'update_time'
);



Method Details

Hide inherited methods

Creates a condition with the BETWEEN operator.

Source code

                public function __construct($value, $operator, $intervalStartColumn, $intervalEndColumn)
{
    $this->value = $value;
    $this->operator = $operator;
    $this->intervalStartColumn = $intervalStartColumn;
    $this->intervalEndColumn = $intervalEndColumn;
}

            

Creates object by array-definition as described in Query Builder – Operator format guide article.

Source code

                public static function fromArrayDefinition($operator, $operands)
{
    if (!isset($operands[0], $operands[1], $operands[2])) {
        throw new InvalidArgumentException("Operator '$operator' requires three operands.");
    }
    return new static($operands[0], $operator, $operands[1], $operands[2]);
}

            

Source code

                public function getIntervalEndColumn()
{
    return $this->intervalEndColumn;
}

            

Source code

                public function getIntervalStartColumn()
{
    return $this->intervalStartColumn;
}

            

Source code

                public function getOperator()
{
    return $this->operator;
}

            

Source code

                public function getValue()
{
    return $this->value;
}

            

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4