天天看点

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;