ID: 26828
Updated by: [EMAIL PROTECTED]
Reported By: jim dot hatfield at insignia dot com
-Status: Open
+Status: Assigned
Bug Type: Sybase (dblib) related
Operating System: FreeBSD 4.5-RELEASE
PHP Version: 4.3.4
-Assigned To:
+Assigned To: iliaa
New Comment:
See bug #25777 (assigning this to Ilia who removed this trimming from
ext/sybase)
Previous Comments:
------------------------------------------------------------------------
[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