RE: [PHP-DB] Oracle CLOBs and carriage returns
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:[EMAIL PROTECTED]] Sent: Thursday, August 09, 2001 2:09 PM To: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Oracle CLOBs and carriage returns
On Thursday, August 09, 2001 at 2:09 PM, Tom Tsongas said: 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? echo nl2br($lob_data); - Brian --- Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Oracle CLOBs and carriage returns
Thanks Anthony. The PRE tags worked perfectly! Tom Anthony Carlos wrote: 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:[EMAIL PROTECTED]] Sent: Thursday, August 09, 2001 2:09 PM To: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]