[Zope] Passing multi-line field into SQL

Tony Mann tony@intelligenesis.net
Wed, 24 May 2000 14:37:07 -0400


You enter a line break by pressing the Enter key!

We are using Gadfly for right now, until our Oracle db server is set up.

We actually found a solution:

    <dtml-var "'\''"><dtml-var "_.string.replace(description ,'\n','<br>')"
sql_quote><dtml-var "'\''">,

Kind of ugly, but it works. I imagine there are more elegant solutions.

Note that I used dtml-var to produce a single quote to avoid nasty nested
quote issues.

..tony..

=================================

In article <ADEJJHCCJLPKOFCAHEKNKELHCGAA.tony@intelligenesis.net>, Tony
Mann <tony@intelligenesis.net> writes
>We have a form with a textarea on it, that can contain line breaks. When we
>try to pass it into an SQL statement

How do you enter line breaks into a text area?

What database adapter are you using?