天天看點

ThinkPHP 架構 查詢語句 like和notlike

like  查詢以mth開頭的訂單

$data=M("order_qz_main")->where("ymain_id","like","mth%")->select();
var_dump($data);exit;
           

notlike  查詢不以mth開頭的訂單

$data=M("order_qz_main")->where("ymain_id","notlike","mth%")->select();
var_dump($data);exit;