更新时间:2022-12-18 13:22:23
Thanks for your response. I got the solution.
$date = date("Y-m-d");
$prev_date = date('m-d-Y', strtotime($date .' -1 day'));
$res = $this->Gshuplogs->find()->select([
'id', 'external_id', 'status', "created"
])->where([
"FROM_UNIXTIME(`created`,'%m-%d-%Y')" => $prev_date,
'OR' => [
['BINARY(status) in ' => ['success','DEFERRED']],
['status IS NULL']
]
]);
debug($res->toArray());exit;