thinkphp循环查询A表的数据,怎么用A表的ID查询出B表的数据,怎么把B表的数据加入循环并且view展示出来
程序员文章站
2024-01-31 19:30:28
...
回复内容:
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);