how can i set a large String to a xmltype field use PHP?

From: Date: Sat, 27 Nov 2004 11:14:56 +0000
Subject: how can i set a large String to a xmltype field use PHP?
Groups: php.db 
Request: Send a blank email to php-db+get-37414@lists.php.net to get a copy of this message
i can set xml String to xmltype field with: $sql_insert_sql = "insert into g_province (p_id,p_regionid,p_provincenameobj,solt) values (g_province_q.nextval,'".$_GET['region_id']."',sys.XMLTYPE.createXML('".$xml _con."'),0)"; but if $xml_con too long,i can not set this content into xmltype fields. then , i use : ************************************************ <? /* //(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,xmltype(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----------------------------------------- ?> ************** run it ,display these errors: Warning: ociexecute(): OCIStmtExecute: ORA-22816: unsupported feature with RETURNING clause in /home/www/bigfish/sgtest/testclob.php on line 12 Warning: 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 how can i set long content to xmltype fields??

« previous php.db (#37414) next »