作者:马先生2502911467 | 来源:互联网 | 2023-10-10 12:55
Isthiskindofifstatementvalid?这种if语句有效吗?if($result1oci_fetch_array($oms_query2)!null)
Is this kind of if statement valid?
这种if语句有效吗?
if($result1 = oci_fetch_array($oms_query2) != null){}
It returns the error:
它返回错误:
Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch
警告:oci_fetch_array()[function.oci-fetch-array]:ORA-24374:在获取或执行和获取之前定义未完成
Here's the code snippet:
这是代码片段:
$oms_query = oci_parse($conn_oms,"select * from R_VALIDATION order by query_id");
oci_execute($oms_query);
while($row = oci_fetch_assoc($oms_query)) {
extract($row);
If ($ACTIVE=='Y') {
$TOTAL++;
$result = array();
$FIELD=explode(';',$FIELDS);
$FIELD_COUNT=count($FIELD);
$_SESSION[ 'field' ] = $FIELD;
$_SESSION[ 'field_count' ] = $FIELD_COUNT;
$testing = 0;
$oms_query2 = oci_parse($conn_oms,$QUERY);
oci_execute($oms_query2);
if($result1 = oci_fetch_array($oms_query2) != null) {
var_dump($result1);
$IMPACTED++;
if($FIELD[0]!=null) {
$oms_query3 = oci_parse($conn_oms,$QUERY);
oci_execute($oms_query3);
while($result = oci_fetch_array($oms_query3))
$testing++;
echo''.$QUERY_ID.' | '.$QUERY_NAME.' | '.$QUERY_TYPE.' | '.$testing.' |
';
}
oci_free_statement($oms_query2);
}
}
}
1 个解决方案