1. 程式人生 > >ThinkPHP 框架 查詢語句 like和notlike

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;