Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
if ($this->value)
$query->andWhere('`subnet` IN (SELECT `id` FROM `subnet` WHERE `bras` = :bras)',['bras'=>2])
If there are models, then something like this:
$subnetQuery = Subnet::find();
$subnetQuery->andWhere(['bras' => 2]);
$clientQuery = Clint::find();
$clientQuery->andWehere(['in', 'subnet', $subnetQuery]);
//
$clientQuery->all();
//
$clientQuery->limit(1);
$clientQuery->one();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question