且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

区分大小写的查询

更新时间: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;

相关阅读

技术问答最新文章