欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

tp3.2 tp5.0 tp5.1中where not in 写法

程序员文章站 2022-02-27 07:33:29
...

where not in 

tp3.2.3 

M('table')->where(['id'=>id])->where(['field'=>['not in',$where]])->delete();


tp5.0 

Db::name('table')->where('id',$id)->where('field','not in',$where)->delete();

Db::name('table')->where('id',$id)->whereNotIn('field',$where)->delete();

 

tp5.1

Db::name('table')->where('id',$id)->where('field','not in',$where)->delete();

Db::name('table')->where('id',$id)->whereNotIn('field',$where)->delete();