select in查询出现问题,求助

浏览:297 发布日期:2017/05/24 分类:求助交流
请问我本来想通过$where1['bookid1']=$data['goods']['id'];
$data1=M('Association')->where($where1)->select();找出若干条记录作为查询条件,经过参考网上类似问题以后,编写代码:
$where2['bookid2']=M('Association')->where($where1)->field('bookid2')->select();
for($i=0;$i<count($data1);$i++){
$ak[$i]=$where2['bookid2'][$i]['bookid2'];
}
$where3['id']=array('in',implode(',',$ak));
$data2=M('Goods')->where($where3)->select();
结果报错:

求教各位大神
最佳答案
评论( 相关
后面还有条评论,点击查看>>