RE: [PHP-DB] Oracle CLOBs and carriage returns

From: Date: Thu, 09 Aug 2001 18:19:10 +0000
Subject: RE: [PHP-DB] Oracle CLOBs and carriage returns
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11197@lists.php.net to get a copy of this message
Tom: I suspect that your problem is with the HTML, not the CLOB itself. Have you tried echoing $lob_data in between <PRE> tags or using the nl2br function in PHP? It converts nl's to <BR> tags. Hope it helps, Anthony -----Original Message----- From: Tom Tsongas [mailto:tsongas@veritas.com] Sent: Thursday, August 09, 2001 2:09 PM To: php-db@lists.php.net Subject: [PHP-DB] Oracle CLOBs and carriage returns 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#11197) next »