我想得到受$sql影响的行数组.但是下面的代码不起作用.它只提供了第一个记录


I want to get array of rows affected by the $sql.But following code is not working.It gives only first record?

oci_execute($sql);  
for($x = 1; $x <= oci_fetch_Array($sql); $x++)  
{
    $rows[]= oci_fetch_assoc($sql);
}
return $rows;

我猜您使用的是没有oci_parse的oci_execute?

例如,

$stid=oci_parse($conn,'SELECT*FROM employes');oci_execute($stid);

请参阅示例。