note 108661 modified in function.oci-new-descriptor by danbrown

From: Date: Tue, 15 May 2012 20:48:02 +0000
Subject: note 108661 modified in function.oci-new-descriptor by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187997@lists.php.net to get a copy of this message
If you're passing a clob variable to oracle stored procedure, you could:

<?php
$qry = 'begin my_sp(:largetext); end;';
$stmt = oci_parse($conn, $qry); //definition of $conn is not included here
$clob = oci_new_descriptor($conn, OCI_D_LOB);
oci_bind_by_name($stmt, ":largetext", $clob, -1, OCI_B_CLOB);
$clob->writetemporary($mylargedata);
oci_execute($stmt);
$clob->free();
oci_free_statement($stmt);
?>

Hopefully this will help! --was-- If you're passing a clob variable to oracle stored procedure, you could: $qry = 'begin my_sp(:largetext); end;'; $stmt = oci_parse($conn, $qry); //definition of $conn is not included here $clob = oci_new_descriptor($conn, OCI_D_LOB); oci_bind_by_name($stmt, ":largetext", $clob, -1, OCI_B_CLOB); $clob->writetemporary($mylargedata); oci_execute($stmt); $clob->free(); oci_free_statement($stmt); Hopefully this will help! http://php.net/manual/en/function.oci-new-descriptor.php

« previous php.notes (#187997) next »