'\n' works for me in the command line client
select concat('Co: ABC','\n','Acct: 123','\n','Drive: Summer Special');
+-----------------------------------------------------------------+
| concat('Co: ABC','\n','Acct: 123','\n','Drive: Summer Special') |
+-----------------------------------------------------------------+
| Co: ABC
Acct: 123
Drive: Summer Special |
+-----------------------------------------------------------------+
If you are doing this in PHP, why not just use '<BR>'?
Maybe you are gettig extra slashes you need to strip?
http://us2.php.net/manual/en/function.stripslashes.php
-----Original Message-----
From: John Thorne [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 9:07 AM
To: '[email protected]'
Subject: Carriage return in query ???
Hello
Trying to CONCAT several fields into one with carriage in a
Dreamweaver/php
recordset
I found an example for MS SQL
SELECT recid, CoName, Drive, Del_Proj,
'Co: ' +CoName + CHAR(13) + 'Acct: ' + Acct + CHAR(13) +'Drive: ',
Drive) AS
Info
FROM data
ORDER BY recid ASC
Desired Result:
Co: ABC
Acct: 123
Drive: Summer Special
mySQL:
SELECT recid, CoName, Drive, Del_Proj,
CONCAT('Co: ',CoName, what syntax here??,'Acct: ',Acct,, what syntax
here
??,'Drive: ', Drive) AS Info
FROM data
ORDER BY recid ASC
have tried '\n' '\\n' '\r' '\\r' .... etc
help
thanks
jrt
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]