M
M
maiskiykot2018-12-27 03:29:42
Yii
maiskiykot, 2018-12-27 03:29:42

How to write a Yii2 condition correctly?

There is an expression in the function:

return self::find()->where(['or',
            ['in', 'order_status', self::$orderStatusesForCookWorker],
            ['is', 'order_status', null]
        ])
          ->andWhere(['pos_id' => $seller->pos_id])
          ->with('packagings')
          ->andWhere(['DATE(order_datetime)' => date('Y-m-d')])
          ->all();

I need to search not only for the order_status field, but also for the order_status_2 field. However, something doesn't work. Prompt, please, or give a link to the manual for such cases.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question