|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-11-19 07:20 UTC] webmaster at cbre dot fr
Description: ------------ mssql_fectch_* functions are returning a space char when selecting empty fields. The problem does not occur where MSSQL table fields are set to <NULL> value insteed of empty. It was not working this way with PHP 4.3.2 and previous versions. I can't see nothing in the change log about this. Kind regards Clement PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 14:00:01 2025 UTC |
The Protocol have been changed. Quote from Sybase Doco. [quote] The empty string ("") is treated as a single space. In *char* and *nchar* *not null* columns, the result is a (column-length) field of spaces. [/quote] Found on Bug Report: http://bugs.php.net/bug.php?id=6527 Its not nice... Just I write my own empty-Function..... FrancoisIn my opinion this is bug, and is still present on version 4.3.6. This is not only problem with CHAR, and NCHAR columns but also empty VARCHAR columns returns space. Example: $re = mssql_fetch_row(mssql_query("SELECT CAST('' AS VARCHAR(10))")); print('--'.$re[0].'--'); // the result is: -- -- // and should be: ---- Because of that I still use PHP4.3.3.