ID: 45527 Updated by: [EMAIL PROTECTED] Reported By: technischersupport at googlemail dot de -Status: Open +Status: Bogus Bug Type: MSSQL related Operating System: Windows XP PHP Version: 5.2.6 New Comment:
[4 Apr 2006 7:03pm UTC] [EMAIL PROTECTED] [delete] This is a bug in the DB library used in the extension. The only workarround is to trim the value and that would be wrong if the data storred actually was a space. Previous Comments: ------------------------------------------------------------------------ [2008-07-16 09:21:35] technischersupport at googlemail dot de 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 this bug report at http://bugs.php.net/?id=45527&edit=1