Home >Backend Development >PHP Tutorial >thinkphp loops to query the data of table A, how to use the ID of table A to query the data of table B, how to add the data of table B to the loop and display it in the 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>