Subject Query result has unexpected padding.
Author Max dAyala
Hello all. I've recently come across a problem and I thought that I'd
see if anyone else has come across the same problem and knows a solution.

The current setup I'm using is as follows.

PHP 5.2.4 running on 32 bit Linux (Fedora 8)
Firebird 2.1.1
With both PHP and Firebird the default character encoding is set to UTF8.

With certain SQL queries I am finding that the result of the query is
being padded with whitespace of some kind.

The query code looks something like this:

$result = ibase_query( $trans, $sql );

If DATAID=122 doesn't exist I'm expecting $result to be "false".

If I do a var_dump of $result I get the following:

string(2) "0 "

Other than the fact that the result is zero rather than "false" it has
unwanted padding after it.

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.

So, has anyone else come across this, or got any ideas of what might
be causing the extra padding?

Thanks in advance,