One - One Code All

Blog Content

thinkphp中查询语句中in的使用方法

PHP   2020-11-01 19:32:43

查询语句中使用数组作为参数。

$cate[] = $cid;//$cate为一个数组
$where['cid'] = array('in',$cate);//cid在这个数组中,
M('category')->where($where)->delete();//$where作为条件传进来



上一篇:centos8安装php7.4
下一篇:thinkphp6分页传递参数

The minute you think of giving up, think of the reason why you held on so long.