0
我有3個表Yii2:ActiveQuery使用關係
證書,用戶狀態
他們有這些關係:
certificates - user, one -- many
user-status, one -- one
我有activeQuery太:
$this->andWhere(['<', 'created', new Expression("DATE_SUB(NOW(), INTERVAL " . $days . " DAY)")])
->andWhere(['is_active' => 1])
->andWhere(['<', 'delayed_until', new Expression("NOW()")])
->andWhere(['<', 'resend_count', LeCertificate::RESEND_COUNT])
是有可能添加範圍->andWhere
我可以得到status.not_deleted = 0
當前證書?