ID: 45652
User updated by: dsauneuf at guillemot dot fr
Reported By: dsauneuf at guillemot dot fr
Status: Bogus
Bug Type: MSSQL related
Operating System: Windows
PHP Version: 5.2.6
New Comment:
As I told you it is working fine under fedora / apache / freetds, and
this is running with the SAME mssql database.
If you are compting the number of character in an empty string, the
result cannot be something different than 0, as it is the definition of
the empty string ! So the result is wrong. Now, it can have something to
see with either php.ini or the api ntwdblib.dll, or even the way the API
is used by PHP, but it cannot be the expected behavior. It is not how
MSSQL works either.
If this has been submitted *many* times already, can you please provide
me with the resolution brought to those case ?
Previous Comments:
------------------------------------------------------------------------
[2008-07-29 10:50:10] [EMAIL PROTECTED]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
This has been submitted *many* times already, and it is also expected
behavior. It\'s simply how MSSQL works.
------------------------------------------------------------------------
[2008-07-29 10:43:39] dsauneuf at guillemot dot fr
Description:
------------
Empty string turned into a blank character.
-----------
Running a php site under windows 2003 / IIS / ntwdblib.dll
(2000.80.2039.0) to access an SQL server 2000 database.
Same thing under Windows XP / IIS / ntwdblib.dll.
Works fine under fedora / apache / freetds.
Denis
Reproduce code:
---------------
$sql=" select '' ";
$res_id=mssql_query($sql)or die ("Database Error");
$row=mssql_fetch_row($res_id);
echo strlen($row[0]);
Expected result:
----------------
Should return 0.
Actual result:
--------------
Returns 1.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45652&edit=1