#26996 [Com]: If a field is empty it returns one blank space character.
ID: 26996
Comment by: cbunk at arescorporation dot com
Reported By: arion_ at msn dot com
Status: Bogus
Bug Type: MSSQL related
Operating System: Windows
PHP Version: 4.3.4
New Comment:
The bug is not bogus and not already covered in bug report
http://bugs.php.net/bug.php?id=25777. The
mentioned bug report was
fixed causing this specific problem. When querying a MSSQL db and the
field's value is empty a space gets returned, not an empty string as
expected. This is causing lots off problems with scripts I have that
check to see if a value is empty to determine if to display some stuff.
The bug report http://bugs.php.net/bug.php?id=26996 got listed as
bogus but it was a correct report. I'm not sure I think I may try
submitting another bug report in hopes it will be noticed.
Previous Comments:
------------------------------------------------------------------------
[2004-01-26 06:06:20] arion_ at msn dot com
I've read the bug report you sent me but..... I only need to know if
there will be solution in future versions, if I must adapt all my
scripts using trim(), or to use 4.3.3 for ever.
Thanks.
------------------------------------------------------------------------
[2004-01-21 14:43:26] sniper@php.net
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.
See bug #25777 and add your comments there.
------------------------------------------------------------------------
[2004-01-21 14:37:56] arion_ at msn dot com
I've just done and I'm sorry :( but 4.3.5RC2-dev doesn't work yet. If
you need I test something more, just tell me.
Thanks.
Running on Apache 2.0.48
------------------------------------------------------------------------
[2004-01-21 14:22:47] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2004-01-21 12:57:20] arion_ at msn dot com
Description:
------------
If a field is empty it returns one blank space character.
Reproduce code:
---------------
<?php
$host="XXX";
$usuario="User";
$password="Password";
$bbdd="BBDD";
$conexion=mssql_connect("$host","$usuario","$password");
$qry="SELECT Field
FROM dbo.Table";
$handle=mssql_query($qry);
$registro=mssql_fetch_row($handle);
$Nothing=$registro[0];
echo "Just" .$Nothing. "DoIt";
?>
Expected result:
----------------
JustDoIt
Actual result:
--------------
Just DoIt
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26996&edit=1
Thread (8 messages)