Tencent / Biny

Biny is a tiny, high-performance PHP framework for web applications
BSD 3-Clause "New" or "Revised" License
1.69k stars 258 forks source link

请问,'not like' 要怎么写。 #129

Open 3DMXM opened 3 years ago

3DMXM commented 3 years ago

因为需要,要筛选“不包含某些字符”的数据,要用到not like来进行操作,发现好像不支持。。。

billge1205 commented 3 years ago

是的 not like api里是没做支持,也不建议使用, 如果一定要用,可以参考sql模板 http://www.billge.cc/#dao-command

$result = $this->userDAO->filter(array('id'=>10))
    ->select("select * from :table WHERE :where and `column` not like `%xxx%`;");
billge1205 commented 3 years ago

not like 现在支持了,同时也支持了regexp,用法跟其他运算符一致,参考文档 http://www.billge.cc/#dao-extracts