【thinkphp】之查询多个指定ID
2020-05-15ThinkPHP
thinkphp查询多个id的方法
展示
//查询指定分类并展示
public function getCate(){
$where['cid'] = array("in","43,44");
return db::name('column')->where($where)->field('cid,name')->select();
}
注:
$where['cid'] -------数据表的ID
array("in","43,44");----->要查询的ID
where($where)---->条件传入
很赞哦! ()