Subject Re: Query result has unexpected padding.
Author Max dAyala
--- In firebird-php@yahoogroups.com, "Jiri Cincura" <diskuze@...> wrote:
>
> On Tue, Sep 30, 2008 at 4:39 PM, Max dAyala <max@...> wrote:
> > I've had similar results when doing a select query on a column defined
> > as a Char(1). The returned value was the correct character, but had
> > unwanted padding after it.
>
> I can confirm this. As a workaround just do there, in select, any
> dummy computing and problem is gone. It's problem in PHP driver.
>
> --
> Jiri {x2} Cincura (CTO x2develop.com)
> http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com
>

Thanks, it's good to get confirmation about where the problem is.

Following your suggestion, with the SELECT statement doing this works
for me:

SELECT COL1 || '' FROM TBLDATA ...


In the case of the DELETE the only solution I can see is to test for
the incorrect return value.

So something like this works in my case:

if ( trim($result)==="0" )

instead of

if ( $result===TRUE )


Max