Re: PHP 4.3.8/Oracle 9i OCI call question for BLOBs
| From: | Christopher Jones | Date: | Mon, 04 Oct 2004 06:33:00 +0000 |
| Subject: | Re: PHP 4.3.8/Oracle 9i OCI call question for BLOBs | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36568@lists.php.net to get a copy of this message | ||
kkoehler@comcast.net wrote:
I'm trying to write text to a BLOB. I got a valid return code but it did not write the BLOB. I was able to use similar code writing to a CLOB. Any examples I've seen for BLOBs are reading
from Binary files. Here's how I did the CLOB, but it would not work for BLOB. Is this a bug in PHP?
$query = "insert into " . getSchema() . "attf_description " .
"(id, narticid, nordertoprint, vheadertoprint, cldescription ) " . " values(" .
$id . ", " . $articid . ", " . $ordertoprint . ",'" . $headertoprint . "', EMPTY_CLOB()) "
. "returning CLDESCRIPTION into :CLDESCRIPTION";
$parsed = ociparse($connection,$query);
$clob = OCINewDescriptor($connection, OCI_D_LOB);
$bind = OCIBindByName($parsed, $clob_name, $clob, -1, OCI_B_CLOB);
ociexecute($parsed, OCI_DEFAULT);
$err = $clob->save($clob_data);
$committed = ocicommit($connection, OCI_DEFAULT);
OCIFreeStatement( $parsed );
Thanks,
Kathy
BLOB and CLOB handling is similar. Without knowing your failing code
I cannot tell what your problem is
There is a working BLOB example at:
http://forums.oracle.com/forums/thread.jsp?forum=178&thread=233174&message=664200&q=626c6f62#664200
Chris