I need to select data from database where a certain field is null, I write my code like this :
$mainMessages = Message::find()
->where(‘replied_to = :rto && department_id = :did’)
->addParams([’:rto’ => NULL, ‘:did’ => $department_id])
but it returns an empty array, how can I write the code correctly.