同时操作多条信息,使用关键字in

1 $pid=$_POST['lianpiaono'];
2 $darr=explode(",", $pid);
3 $cnt=count($darr);//统计数据个数
4 foreach ($darr as $key => $value) {
5     $str.="'".$value."',";
6 }
7 $str=substr($str,0,$str.length-1);
8 $nos = $this->db->where("lianpiaono in ($str) and isclose=0 and jqid=$jqid")->field('lianpiaono,id,status')->select();

 

posted @ 2016-01-21 16:02  北斗星空的笨小孩  阅读(168)  评论(0编辑  收藏  举报