List:General Discussion« Previous MessageNext Message »
From:Jeff Gannaway Date:July 15 2004 6:06pm
Subject:Re: What format for text fields?
View as plain text  
>David Blomstrom <david_blomstrom@stripped> wrote on 07/14/2004 10:16:41
> > I was just curious how most of you do it. Do you just
> > dump in your text, or do you go to extra lengths to
> > make sure each paragraph begins on a new line in your
> > database? Whay code do you use for line breaks, so it
> > looks neat when you preview your source code on a web
> > page?

Personally, I don't go to extra lengths to insert those newlines.  Mostly 
because I have to sometimes move data from MySQL to a tab-delimetd text 
file, and those extra linefeeds can cause problems.

If you want to do it, here's the how-to:
Insert this character combination: /n/r

Example ISNERT Query:

INSERT INTO my_table VALUES ('This is the 1st line<BR>/n/rThis is the 2nd');

Later on, when it's read from the database an put on a web page, the "view 
source" would look like:

This is the 1st line<BR>
This is the 2nd

Hope this helps.  God bless!
-Jeff Gannaway

This Is Where Music Is Going - Listen Online!

What format for text fields?David Blomstrom15 Jul
  • Re: What format for text fields?SGreen15 Jul
Re: What format for text fields?Jeff Gannaway15 Jul