Re: Carriage Returns Disappearing

From: <operationsengineer1(at)yahoo(dot)com>
To: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Carriage Returns Disappearing
Date: 2005-05-31 17:55:12
Message-ID: 20050531175512.66168.qmail@web52406.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


--- Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com> wrote:
> Hi,
>
> On 5/26/05, operationsengineer1(at)yahoo(dot)com
> <operationsengineer1(at)yahoo(dot)com> wrote:
> > my users enter a note. i would like to keep
> carriage
> > returns intact. however, when i display the data,
> the
> > two carriage returns are lost and replaced with
> two
> > spaces.
> >
> > i use adodb's qstr() fumction to handle my
> excaping
> > upon entry.
>
> There seems to be a problem with ADOdb's escaping
> PostgreSQL literals
> routine, because it's commented out and ADOdb is
> using its default
> qstr() routine. (I should check it in an suitable
> time.) Therefore, I
> advice you to use pg_escape_string().
>
> Regards.
>
> P.S. I've traced to qstr() code but couldn't find
> the
> adodb_str_replace() function in ADOdb source code
> used by qstr().
> Thus, I cannot give a correct answer about where
> qstr() dumps your
> problem.
>

i used pg_escape_string() and received the same
results. the carriage returns are showing up as
stored in the db. when select the data, though, the
carriage returns are replaced with a single space,
regardless if it is one return or 5 returns.

the sql seems to be pretty standard fare...

$sql_notes = "SELECT notes.assembly_notes
FROM t_product prod, t_link_product_assembly_notes
link, t_assembly_notes notes
WHERE link.product_id = prod.product_id
AND link.assembly_notes_id = notes.assembly_notes_id
AND link.product_id = " . $product_id;

i then send the array of values to another page where
this code displays the array...

$i=1;
foreach ($_SESSION['row_notes'] as $row)
{
print $i.". ".$row['assembly_notes']."<hr />";
$i++;
}

does anyone know why my carriage returns are not
displaying when i call the data?

is it because i send the array to another page via the
session variable?

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2005-05-31 18:32:29 Re: Carriage Returns Disappearing
Previous Message Marc G. Fournier 2005-05-31 17:45:56 Major flood of mail to lists ...