不言不语

您现在的位置是: 首页 >  PHP  >  ThinkPHP

ThinkPHP

【thinkphp】之查询多个指定ID

2020-05-15ThinkPHP
thinkphp查询多个id的方法

  

展示


微信图片_20200515145118.png


 //查询指定分类并展示
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)---->条件传入


文章评论