我有一个表,我必须使用此表实现嵌套for循环。所以,两个循环都使用相同的表。外循环开始表的第一个索引(主键)并进入最后一个索引。内循环从外循环剩余的地方开始。
我的示例代码:
declare
res varchar2(5);--TRUE or FALSE
BEGIN
FOR aRow IN (SELECT MI_PRINX, geoloc, ROWID FROM ORAHAN)
LOOP
FOR bRow IN (SELECT MI_PRINX, geoloc, ROWID FROM ORAHAN)
LOOP
select SDO_GEOM.RELATE(aRow.geoloc,'anyinteract', bRow.Geoloc,0.02) into res from dual;
if (res='TRUE')
THEN
Insert INTO ORAHANCROSSES values (aRow.MI_PRINX,bRow.MI_PRINX);
END IF;
END LOOP;
END LOOP;
END ;
答案 0 :(得分:1)
<table class="table table-striped table-bordered">
<tr>
<td><strong>Employee Id</strong></td>
<td><strong>First Name</strong></td>
<td><strong>Last Name</strong></td>
</tr>
<?php foreach($fds as $employee){?>
<tr>
<td><? =$employee->data;?></td>
<td><? =$employee->hora;?></td>
<td><? =$employee->tipo;?></td>
</tr>
<?php }?>
</table>
我认为:)