发布网友 发布时间:2024-10-08 19:24
共1个回答
热心网友 时间:2024-12-11 18:41
对前台传来的商品id数组在表中进行查询//$goods=array(11,10,7);$where['goods_id']=array("in",$goods);$where['user_id']=$_SESSION['uid'];$res=D("cart")->where($where)->select();复制代码得到sql语句如下"SELECT*FROM`cart`WHERE`goods_id`IN(11,10,7)AND`user_id`=1