在 Oracle 和 PHP 中使用 LOB
http://www.oracle.com/technetwork/cn/articles/fuecks-lobs-090854-zhs.html
php oracle insert multiple clob
http://cshongyin.blog.163.com/blog/static/16818875920123159524908/
我自己的例子,在这里和大家分享一下
$conn = oci_connect('xxxxx', 'xxxx', '(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxx)(PORT = 1521)))(CONNECT_DATA=(SID=xxxx)))', 'utf8');
$sql = 'insert into TBBOOK_CHAPTER ( ID, CHAPTERCONTENT) values(
SEQUENCE_BOOK_CHAPTER.nextval, EMPTY_CLOB())
RETURNING CHAPTERCONTENT INTO :CHAPTERCONTENT';
$sql = str_replace('"', "'", $sql);
$stid = oci_parse($conn, $sql);
$clob = oci_new_descriptor($conn, OCI_D_LOB);
oci_bind_by_name($stid, ":CHAPTERCONTENT", $clob, -1, OCI_B_CLOB);
oci_execute($stid, OCI_DEFAULT);
$clob->save($volume['chapter_content']);
//$clob->save("A very long string");
oci_commit($conn);