yii\db\ActiveQuery::andOnCondition PHP 메소드

andOnCondition() 공개 메소드

The new condition and the existing one will be joined using the 'AND' operator.
또한 보기: onCondition()
또한 보기: orOnCondition()
public andOnCondition ( string | array $condition, array $params = [] )
$condition string | array the new ON condition. Please refer to [[where()]] on how to specify this parameter.
$params array the parameters (name => value) to be bound to the query.
    public function andOnCondition($condition, $params = [])
    {
        if ($this->on === null) {
            $this->on = $condition;
        } else {
            $this->on = ['and', $this->on, $condition];
        }
        $this->addParams($params);
        return $this;
    }