This topic is locked

Carriage Return Help

12/19/2006 11:56:37 PM
PHPRunner General questions
G
Gary.Beam author

I need to insert a Carriage Return into a string returned by a MySQL query that is displayed in a table cell. The string is formatted as follows:
'Lo Limit: < XX.XXX \n Hi Limit: > XX.xxx'
I need the string to be displayed in the table cell as:
Lo Limit: < XX.XXX

Hi Limit: > XX.XXX
The MySQL query is entered on the Edit SQL manually page as follows:
[codebox]select `TourID`,

`tour_data`.`SeqNum`,

`tour_data`.`MpID`,

`tour_data`.`TimeStamp`,

`Data`,

`Comment`,

`TakenBy`,

`Status`,

r.`EquipID`,

r.`UnitsID`,

IF( `HasLowAlert` OR `HasHiAlert` , CONCAT( 'Lo Limit: ', atl.`AlertString` ,

COALESCE( `LowAlertValue` , 'None' ) ,'\n', ' Hi Limit: ', ath.`AlertString` ,

COALESCE( `HiAlertValue` , 'None' ) ) , 'None' ) AS `Limits`

From tour_data , `route_mps` as r, `list_alert_types` AS atl, `list_alert_types` AS ath

WHERE tour_data.MpID=r.`MpID` AND atl.`AlertTypeID` = `LowAlertTypeID`

AND ath.`AlertTypeID` = `HiAlertTypeID`[/codebox]
I've tried using REPLACE() on '\n' with '

' without success. Any help would be appreciated.

J
Jane 12/20/2006

Gary,
try to use
in your query and select HTML on the "View as" settings dialog on the Visual Eitor tab.

G
Gary.Beam author 12/20/2006

Gary,

try to use
in your query and select HTML on the "View as" settings dialog on the Visual Eitor tab.


Jane,
Thanks for the help. It worked great!
Gary