ID:               34096
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jelenkovic at siol dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: Windows XP SP2
 PHP Version:      4.4.0
 New Comment:

See bug #29292


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

[2005-08-12 12:57:12] jelenkovic at siol dot net

Description:
------------
the mssql query keeps returning a space value instead of NULL or EMPTY
on a nvarchar field which is clearly EMPTY.
This bug has been reported before.Has been marked as closed.
The posts bellow it still say it shouldn't be closed since this is an
actual bug.
And since i don't see the logic in making me check every field for a
space value...i'm gonna call this a bug also.
Unless someone knows how to configure PHP to stop acting this way.

Oh i use php ADODB...which is not responsible for this problem.

tested on the following SQL SERVERS..before you scream "wrong mssql
library"

a)Microsoft SQL Server  2000 - 8.00.760 (Intel X86)   Dec 17 2002
14:22:05   Copyright (c) 1988-2003 Microsoft Corporation  Desktop
Engine on Windows NT 5.1 (Build 2600: Service Pack 2) 

b)Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)   May  3 2005
23:18:38   Copyright   1988-2003 Microsoft Corporation  Standard
Edition on Windows NT 5.2 (Build 3790: Service Pack 1) 

and the php version is 4.4.0 so there is no "old version" problem here.

Reproduce code:
---------------
$query="SELECT * FROM users where username='$username' AND
id='$userid'";
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$results = $db->GetAll($query);
foreach ($results as $data)
{
$id= $data["id"];
$city = $data["city"];
if($city=="") { echo "$id)AAAAAAAAAAAAAAAAAAAAAAA<br>"; }
}
dbclose();

Expected result:
----------------
AAAAAAAAAAAAAAAAAAAAAAA where the city field is empty?

Actual result:
--------------
NOTHING


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


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

Reply via email to