#45527 [NEW]: whitespaces in resultset of empty varchars/text
From: technischersupport at googlemail dot de
Operating system: Windows XP
PHP version: 5.2.6
PHP Bug Type: MSSQL related
Bug description: whitespaces in resultset of empty varchars/text
Description:
------------
It's the same bug as in:
http://bugs.php.net/bug.php?id=26012
http://bugs.php.net/bug.php?id=26315
http://bugs.php.net/bug.php?id=28124
http://bugs.php.net/bug.php?id=31641
http://bugs.php.net/bug.php?id=36968
http://bugs.php.net/bug.php?id=39204
described.
I'm using MSSQL 2005:
Microsoft SQL Server Standard Edition
Microsoft Windows NT 5.2 (3790)
9.00.3068.00
with php_mssql.dll
Version 5.2.6.6
ntwdblib.dll
Version 2000.02.08 (as supplied with php)
The Table:
[COLA] [varchar](5) NULL
[COLB] [varchar](25) NULL
[COLC] [varchar](5) NULL
[COLD] [varchar](25) NULL
[COLE] [varchar](40) NULL
[COLF] [text] NULL
I've written empty strings to the cells and read it out with the appended
code.
The bug isn't bogus!
Reproduce code:
---------------
$connection = mssql_connect($server, $username, $password, true);
$qry = "SELECT * FROM TABLE";
$result_id = mssql_query($qry, $connection);
$row = mssql_fetch_assoc($result_id)
print_r($row);
Expected result:
----------------
[COLA] => "foo"
[COLB] => "bar"
[COLC] => ""
[COLD] => ""
[COLE] => ""
[COLF] => ""
Actual result:
--------------
[COLA] => "foo"
[COLB] => "bar"
[COLC] => " "
[COLD] => " "
[COLE] => " "
[COLF] => " "
--
Edit bug report at http://bugs.php.net/?id=45527&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45527&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45527&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45527&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45527&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45527&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45527&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45527&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45527&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45527&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45527&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45527&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45527&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45527&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45527&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45527&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45527&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45527&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45527&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45527&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45527&r=mysqlcfg
Thread (3 messages)
- technischersupport at googlemail dot de