Oracle CLOBs and carriage returns

From: Date: Thu, 09 Aug 2001 18:08:44 +0000
Subject: Oracle CLOBs and carriage returns
Groups: php.db 
Request: Send a blank email to php-db+get-11196@lists.php.net to get a copy of this message
Hi folks. I have an interesting problem with regards to data I am retrieving from a CLOB stored in my database. The data consists of several paragraphs of information with multiple carriage returns and other formatting mechanisms. Now when I attempt to retrieve the data and display it on the web page, it comes out as one giant line and all carriage returns and tabbing seems to have been obliterated. Here is the code I am using: $sql_comments = OCIParse($connection,"SELECT COMMENTS FROM INCIDENT WHERE INCIDENT='$incident'"); OCIExecute($sql_comments); while ( OCIFetchInto($sql_comments, $row, OCI_ASSOC+OCI_RETURN_NULLS)) { $lob_data = $row["COMMENTS"]->load(); echo $lob_data; } I know the information is stored correctly since a SQL query from the command line works properly and all formatting is displayed. Any thoughts? Tom

« previous php.db (#11196) next »