自己写了一段代码,但是还不是不行下面是我的代码:
***************************8<?
/*
//(tabel_name:articles)DDL; //just for test; 
//create table articles (id number(11),content sys.xmltype); 
*/
//----------This is insert test---------------------------------- 
$conn = @OCILogon("in_user","user_in","bigfish");
//$stmt = @OCIParse($conn,"insert into articles (id,content) values(1,sys.xmlType.createXML(EMPTY_CLOB())) RETURNING content INTO:CONTENT"); 
$stmt = @OCIParse($conn,"insert into articles (id,content) values(1,empty_clob()) RETURNING content INTO:CONTENT"); 
$clob = @OCINewDescriptor($conn,OCI_D_LOB);
OCIBindByName($stmt,':CONTENT',&$clob,"1",OCI_B_CLOB);
OCIExecute($stmt,OCI_DEFAULT);
if ($clob->save("<root><a>JUST TEST</a></root>"))
{
    OCICommit($conn);
    echo "Insert succes!";
}
else
{
    echo "Insert default!";
}
//---------------Insert end-----------------------------------------
//---------------Select start---------------------------------------
$sql = "select content from articles order by id desc";
$stmt = @OCIParse($conn,$sql);
@OCIExecute($stmt,OCI_DEFAULT);
@OCIFetchInto($stmt,&$rows,OCI_RETURN_LOBS);
echo "<br>Content is:\"".$rows[0]."\"";
//---------------Select end-----------------------------------------
?>****************************8
报错:Warning: ociexecute(): OCIStmtExecute: ORA-00932: inconsistent datatypes: expected NUMBER got CLOB in /home/www/bigfish/sgtest/testclob.php on line 12Warning: save(): OCILobWrite: OCI_INVALID_HANDLE in /home/www/bigfish/sgtest/testclob.php on line 13
Insert default!
Content is:""
Warning: Unknown(): _oci_close_session: OCISessionEnd: ORA-00600: internal error code, arguments: [729], [28], [space leak], [], [], [], [], [] in Unknown on line 0