0
昨天我問了一個這樣的問題,但我還沒有得到任何答案。如何在PHP中處理Oracle CLOB?
點:我怎樣才能獲得CLOB參考,如在INSERT INTO或UPDATE語句:
$sql = "INSERT INTO table (data) VALUES (EMPTY_CLOB()) RETURNING data INTO :data";
$statement = oci_parse($conn, $sql);
$descriptor = oci_new_descriptor($conn, OCI_DTYPE_LOB);
oci_bind_by_name($statement, ':data', $descriptor, -1, OCI_B_CLOB);
oci_execute($statement);
$descriptor->save('5000 chars');
oci_free_descriptor($descriptor);
所以,我想調用CLOB保存方法,無需插入和更新語句。 所以我試過了:
$sql = "SELECT data FROM table WHERE id = " . $fooid;
$statement = oci_parse($conn, $sql);
oci_execute($statement);
$row = oci_fetch_assoc($statement);
$row['DATA']->save('5000 chars');
如何?
Thx。