ID:               28124
 Updated by:       [EMAIL PROTECTED]
 Reported By:      cbunk at arescorporation dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: Windows 2000
 PHP Version:      4.3.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is the bug in the mssql library you are using.  
P.S. This issue has been discussed in detail in earlier bug 
reports about the same issue, please search the bug 
archives. 


Previous Comments:
------------------------------------------------------------------------

[2004-04-23 16:15:45] cbunk at arescorporation dot com

Description:
------------
When making a query on a MSSQL DB using mssql functions an extra space
is added to the end of output.  This is causing trouble with scripts of
mine that check to see if the querried field is empty to determine
whether or not to display some text.

The bug mentioned at
http://bugs.php.net/bug.php?id=25777
describes the problem but was marked as bogus.  I think when the fix
for http://bugs.php.net/bug.php?id=25777 was made it in advertently
left an extra space in results.

Reproduce code:
---------------
//once connected to the db
$sql="Select name from contacts";
$result=mssql_query($sql);
$row = mssql_fetch_array($result);
//assume there is one entry in the table 
//with an empty string as the value for 
//name
if (!empty($row["name"])){
  echo "Name: " . $row["name"];
}else{
  echo "Name value is empty";
}

Expected result:
----------------
Name value is empty

Actual result:
--------------
Name: 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28124&edit=1

Reply via email to