Gossamer Forum
Home : Products : Gossamer Links : Discussions :

paragraph markers stored in SQL

Quote Reply
paragraph markers stored in SQL
I am writing a custom mod for my site that stores large amounts of text in a field. I was wonder how I can keep the paragraphs. When I add a record using links methods, and I call a text field, it does not save the paragraphs. All the text gets jumbled together. It keeps my spaces and everything else, it just does not keep the return carriage. I'm not sure if this is part of SQL's inability to hold them, or if it is just because I am submitting from a text box. Any ideas how I can save my paragraph markers?


Thanks,

- Jonathan
Quote Reply
Re: [jdgamble] paragraph markers stored in SQL In reply to
You probably need to replace the \n with <BR>

Simple global;

Code:
sub {
my $str = $_[0];
$str =~ s/\n/<BR>/ig;
return $str;
}

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] paragraph markers stored in SQL In reply to
Laugh duuhhh!

I think for what I am doing I am going to store it in the database with the "<br>".

But thanks, that was what I was looking for.

- Jonathan