Subject | Re: [firebird-support] Return key |
---|---|
Author | Mags Phangisa |
Post date | 2012-06-30T16:44:25Z |
Thanks a lot Milan. This is working perfectly.
Mags
Mags
On Fri, Jun 29, 2012 at 1:12 PM, Milan Babuskov <milanb@...> wrote:
> **
>
>
> Mags Phangisa wrote:
> > I have changed the field to a text blob but the hard return is still not
> > being recognised. I use ibase_blob_echo($rec->FLDNM) to display the data.
> > What could I be doing wrong?
>
> ibase_blob_echo() means you're probably using PHP, so you're probably
> using HTML as output. HTML does not render newline characters by
> default. You have two options:
>
> 1. wrap the output in <pre>....</pre> tags
>
> 2. use nl2br PHP function. In this case you cannot use ibase_blob_echo
> as you need to pre-fetch the blob data into string. To extend the BLOB
> example from PHP manual, you would use something like this:
>
> <?php
> $result = ibase_query("SELECT blob_value FROM table");
> $data = ibase_fetch_object($result);
> $blob_data = ibase_blob_info($data->BLOB_VALUE);
> $blob_hndl = ibase_blob_open($data->BLOB_VALUE);
> echo nl2br(ibase_blob_get($blob_hndl, $blob_data[0]));
>
> --
> Milan Babuskov
>
> ==================================
> The easiest way to import XML, CSV
> and textual files into Firebird:
> http://www.guacosoft.com/xmlwizard
> ==================================
>
>
>
[Non-text portions of this message have been removed]