我无法将Oracle数据库中的数组数据显示到表HTML中。
这是查询:
$sql ="SELECT A.AC,A.CREATED_BY,A.SCHEDULE_COMPLETION_DATE FROM WO A, SECURITY_HEADER B WHERE A.AC LIKE 'PK%' AND A.CREATED_BY=B.\"USER\" AND B.ADOPT_USER_PROFILE LIKE 'MAINT%' AND A.STATUS!='CLOSED' AND A.SCHEDULE_COMPLETION_DATE BETWEEN '$tgl_awal' AND '$tgl_akhir' AND (A.SCHEDULE_COMPLETION_DATE-SYSDATE)<0 ";
$sql_statement = OCIParse($connect,$sql);
OCIExecute($sql_statement);
这是表格代码
<thead>
<tr bgcolor="#CCCCCC">
<th class="text-center">AC</th>
<th class="text-center">CREATED BY</th>
<th class="text-center">USER PROFILE</th>
<th class="text-center">SCHEDULE COMPLETION DATE</th>
</tr>
</thead>
<?php
while ($row = oci_fetch_array($sql_statement,OCI_BOTH)){
//$no++;
?>
<tbody>
<tr>
<th class="text-center"><font size="2"><?php echo $row['AC']; ?></font></th>
<th class="text-center"><font size="2"><?php echo $row['CREATED_BY']; ?></font></th>
<th class="text-center"><font size="2"><?php echo $row['ADOPT_USER_PROFILE']; ?></font></th>
<th><font size="2"><?php echo $row['SCHEDULE_COMPLETION_DATE']; ?></font></th>
</tr>
</tbody>
<?php
}
oci_free_statement($sql_statement);
oci_close($connect);
?>
</table>
这是一个通知:
oci_fetch_array() [function.oci-fetch-array]: ORA-01002: fetch out of sequence in C:\xampp\htdocs\graph\pages\work_orderf3.php on line 544
544行
同时($ row = oci_fetch_array($ sql_statement,OCI_BOTH)){