it isn't a sessions issue... i tested my code to the
same page and received the same single space for any
number of carriage returns in my varchar field.
--- operationsengineer1(at)yahoo(dot)com wrote:
> --- 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
> > 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
> this code displays the array...
> foreach ($_SESSION['row_notes'] as $row)
> print $i.". ".$row['assembly_notes']."<hr />";
> 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
> session variable?
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> ---------------------------(end of
> TIP 6: Have you searched our list archives?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
pgsql-novice by date
|Next:||From: John DeSoi||Date: 2005-05-31 18:45:15|
|Subject: Re: Functions|
|Previous:||From: operationsengineer1||Date: 2005-05-31 17:55:12|
|Subject: Re: Carriage Returns Disappearing|