Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Reading CLOB
najmhashmi_at_videotron.ca says...
> Hi All,
> I have a very basic question. I am trying to read/write large documents from
> a web-app to Oracle 9i using php4.3.
> When I try to use CLOB column and print data directly, the web browser or
> server does not understand that it is clob and just prints out object. Then
> I used to_char function to display info. However, to_char function has
> limitations. My document gets truncated when I display it.
> My first question is, what function I can use to display content to clob
> column type to display in a browser?
Najm,
Suggest that you try in comp.lang.php because your problem is with your PHP script handling the correct data type, not with Oracle.
If you are using PHP's native OCI8 library, you need to check out: http://www.php.net/manual/en/function.oci-bind-by-name.php http://www.php.net/manual/en/function.oci-lob-read.php
However, I suggest that you should seriously look at ADODB, which is a PHP
data abstraction layer which still manages to support key Oracle
fundamentals like bind variables. It will normally handle clobs as part of
a standard select statement, but will require a separate insert/update
specific to lobs when doing writes.
http://adodb.sourceforge.net/
http://phplens.com/adodb/reference.functions.updateclob.html
Geoff M Received on Sun Jan 30 2005 - 22:18:04 CST