{"id":812,"date":"2013-02-26T21:37:40","date_gmt":"2013-02-27T01:37:40","guid":{"rendered":"https:\/\/gonzalo.aro.cl\/blog\/?p=812"},"modified":"2013-02-26T21:44:25","modified_gmt":"2013-02-27T01:44:25","slug":"insertaractualizar-un-clobblob-en-oracle-con-php","status":"publish","type":"post","link":"https:\/\/gonzalo.aro.cl\/blog\/2013\/02\/26\/insertaractualizar-un-clobblob-en-oracle-con-php\/","title":{"rendered":"Insertar\/actualizar un CLOB\/BLOB en Oracle con PHP"},"content":{"rendered":"<p>Este es el codigo que me di\u00f3 finalmente resultado para la insercion de un CLOB de Oracle a trav\u00e9s de PHP.<\/p>\n<pre class=\"brush: php\">\r\n$valor='hola';\r\n$conn= oci_connect($USER, $PASSWD, $CONNECTION);\r\n$query= \"Insert into tabla (ID, DATA) values (1,empty_clob()) RETURNING DATA INTO :aClob\";\r\n$stid= oci_parse($conn, $query);\r\n$clob = oci_new_descriptor($conn, OCI_D_LOB);\r\noci_bind_by_name($stid, \":aClob\", $clob, -1, OCI_B_CLOB); \r\n$r= oci_execute($stid, OCI_DEFAULT);\r\n$clob->save($valor);\r\noci_commit($conn); \r\n$clob->free();\r\noci_free_statement($stid);\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Este es el codigo que me di\u00f3 finalmente resultado para la insercion de un CLOB de Oracle a trav\u00e9s de PHP. $valor=&#8217;hola&#8217;; $conn= oci_connect($USER, $PASSWD, $CONNECTION); $query= \u00abInsert into tabla (ID, DATA) values (1,empty_clob()) RETURNING DATA INTO :aClob\u00bb; $stid= oci_parse($conn, $query); $clob = oci_new_descriptor($conn, OCI_D_LOB); oci_bind_by_name($stid, \u00ab:aClob\u00bb, $clob, -1, OCI_B_CLOB); $r= oci_execute($stid, OCI_DEFAULT); $clob->save($valor); oci_commit($conn); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,9,47],"tags":[],"class_list":["post-812","post","type-post","status-publish","format-standard","hentry","category-base-de-datos","category-desarrollo","category-oracle","category-php"],"_links":{"self":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/812"}],"collection":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/comments?post=812"}],"version-history":[{"count":2,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/812\/revisions"}],"predecessor-version":[{"id":814,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/posts\/812\/revisions\/814"}],"wp:attachment":[{"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/media?parent=812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/categories?post=812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gonzalo.aro.cl\/blog\/wp-json\/wp\/v2\/tags?post=812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}