【发布时间】:2020-05-05 11:16:02
【问题描述】:
我的 php 收到以下警告:“OCI-Lob::save():OCI_INVALID_HANDLE”,第 38、39 行
<?php
$lob_e = oci_new_descriptor($connection, OCI_D_LOB);
$lob_w = oci_new_descriptor($connection, OCI_D_LOB);
$stid = oci_parse($connection, "
UPDATE RES_LICENCE_TEXT T
SET
LICENCE_TEXT_EN = EMPTY_CLOB(),
LICENCE_TEXT_CY = EMPTY_CLOB(),
updated_by = :my_updated_by,
updated_date = SYSDATE
WHERE T.hall_Seq = :my_hall_seq
and :my_academic_year = academic_year
and :my_app_period = app_period
and step_name = 'assoc_instr'
and :offer_id = offer_id
RETURNING LICENCE_TEXT_EN,LICENCE_TEXT_CY INTO :CLOBDATA_E, :CLOBDATA_W");
oci_bind_by_name($stid, ':MY_ACADEMIC_YEAR', $_SESSION['chosen_year']);
oci_bind_by_name($stid, ':MY_APP_PERIOD', $_SESSION['chosen_app_period']);
oci_bind_by_name($stid, ':offer_id', $offer_id);
oci_bind_by_name($stid, ':MY_HALL_SEQ', $_SESSION['hall_seq']);
oci_bind_by_name($stid, ':CLOBDATA_E', $lob_e, -1, OCI_B_CLOB);
oci_bind_by_name($stid, ':CLOBDATA_W', $lob_w, -1, OCI_B_CLOB);
oci_bind_by_name($stid, ':my_updated_by', $_SESSION['loguser']);
$success = oci_execute($stid, OCI_DEFAULT);
if (!$success) {
oci_rollback($connection);
$text_insertion_error = 0;
} else {
$lob_e->save($html_e_string);
$lob_w->save($html_w_string);
oci_commit($connection);
$text_insertion_error = 1;
}
oci_free_descriptor($lob_e);
oci_free_descriptor($lob_w);
oci_free_statement($stid);
?>
有问题的行是: $lob_e->save($html_e_string);和 $lob_w->save($html_w_string); 请问我可以得到一些帮助吗? 干杯
【问题讨论】:
-
html_e_string和html_w_string的大小是多少
标签: php oracle oracle-call-interface