#26828 [Asn->Bgs]: queried bit fields are space-padded
| From: | iliaa@php.net | Date: | Fri, 09 Jan 2004 13:50:34 +0000 |
| Subject: | #26828 [Asn->Bgs]: queried bit fields are space-padded | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-53028@lists.php.net to get a copy of this message | ||
ID: 26828
Updated by: iliaa@php.net
Reported By: jim dot hatfield at insignia dot com
-Status: Assigned
+Status: Bogus
Bug Type: Sybase (dblib) related
Operating System: FreeBSD 4.5-RELEASE
PHP Version: 4.3.4
Assigned To: iliaa
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Not a bug.
Read previous similar reports such as #26835, etc...
Previous Comments:
------------------------------------------------------------------------
[2004-01-07 21:27:35] sniper@php.net
See bug #25777 (assigning this to Ilia who removed this trimming from
ext/sybase)
------------------------------------------------------------------------
[2004-01-07 09:19:37] jim dot hatfield at insignia dot com
Description:
------------
Retrieve one row from a Sybase database using
DB-Lib and Freetds 0.61_1.
"manager" is a smallint and "ts_admin" is a "bit".
The first record has field values 1 and 0 for these
fields respectively.
I did a "portupgrade lang/php4" between the two runs so I know the only
thing which changed was the PHP version.
Reproduce code:
---------------
$db = sybase_connect($server, $user, $pass);
sybase_select_db($dbname, $db);
res =
$sybase_query("select manager, ts_admin from employees", $db)
$row = sybase_fetch_row($res);
echo "Manager = \"$row[0]\"\n";
echo "TS_Admin = \"$row[1]\"\n";
Expected result:
----------------
4.3.3 returns:
Manager = "1"
TS_Admin = "0"
Actual result:
--------------
4.3.4 returns:
Manager = "1"
TS_Admin = "0 "
note the space padding. When tested in
an if this returns TRUE when without the
padding it is FALSE
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26828&edit=1