RE: [PHP-DB] TEXT fields without line breaks

From: Date: Fri, 06 Jul 2001 15:49:34 +0000
Subject: RE: [PHP-DB] TEXT fields without line breaks
Groups: php.db 
Request: Send a blank email to php-db+get-10122@lists.php.net to get a copy of this message
Ive encountered this at my last job and we were using perl as our backend. Before inserting into the database, check for \n or \r and replace with a combo of chars that are mostly likely not to be typed into the text field. Examples: ][, or |43; or whatever... Then when you reread back from the database and output the data, swap your special newline chars with \n. A bit of a pain, but it works. Kevin Johnson KJ -----Original Message----- From: Mat Marlow [mailto:mat@cryptic.co.uk] Sent: Friday, July 06, 2001 8:42 AM To: php-db@lists.php.net Subject: [PHP-DB] TEXT fields without line breaks Hi all, (I'm not sure if this is the right place to submit this but I'm having problems with the php.general group) I am in desperate need for a solution to HTML text fields not storing new lines. I'm storing news articles in a database but all the text just ends up in a big block because it ignores line breaks. Is there a way around this without having to upload text files? Thanks, Mat -- 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 (#10122) next »