Maison >développement back-end >tutoriel php >thinkphp循环查询A表的数据,怎么用A表的ID查询出B表的数据,怎么把B表的数据加入循环并且view展示出来
<code>foreach ($six_month as $k => $v) { $six_upload = $upload->where("month_id={$vo['id']}")->find(); $six_month[$k]['upload'] = $six_upload; } $this->assign('six_month', $six_month);</code>