Re: [PHP4BETA] LOB support for oci8 broken ?
| From: | thies at digicol dot de | Date: | Wed, 03 May 2000 09:25:08 +0000 |
| Subject: | Re: [PHP4BETA] LOB support for oci8 broken ? | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-14419@lists.php.net to get a copy of this message | ||
On Wed, May 03, 2000 at 10:48:11AM +0200, Andreas Karajannis wrote:
> Andreas Jung wrote:
> >
> > Hi,
> >
> > I tried the following (according to the documentation)
> > to insert a LOB into an O8i table with a CLOB field "inhalt":
> >
> > #!/ojs/home/ora8/tmp/php
> > <?
> >
> > $conn = OCILogon("dummy","dummy","fulltext");
> > $stmt = OCIParse($conn,"insert into fulltext (docnum,inhalt)
> > values('blabla',:mb ) ");
> >
> > $clob = OCINewDescriptor($conn, OCI_D_LOB);
> > OCIBindByName($stmt,':mb',&$clob,-1,OCI_B_CLOB);
> >
> > $s="";
> > for ($i=0;$i<2000;$i++) $s.="x";
> >
> > OCIExecute($stmt,OCI_DEFAULT);
> > if($clob->save($s)) OCICommit($conn);
> > else echo "clob problem";
> >
> > OCIFreeStatement($stmt);
> >
> > OCILogoff($conn);
> >
> > ?>
> Try the following: (Yes, Oracle LOB support is ahm ...)
hmm not a lot we can do to make it easier (maybe a pear
module?)
tc
>
> <?
> ...
> $clob = OCINewDescriptor($conn, OCI_D_LOB);
> $stmt = OCIParse($conn,"insert into fulltext (docnum,inhalt)
> values('blabla', EMPTY_BLOB()) returning inhalt into :mb");
> OCIBindByName($stmt,':mb',&$clob,-1,OCI_B_CLOB);
> $s="";
> ...
> ?>
>
> -Andreas
>
> --
> Andreas Karajannis
> GMD National Research Center for Information Technology
> Schloss Birlinghoven, D-53754 Sankt Augustin
> Phone +49 2241 142948
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany