|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-12 15:45 UTC] sniper@php.net
[2005-08-14 11:13 UTC] jelenkovic at siol dot net
[2005-08-14 11:16 UTC] jelenkovic at siol dot net
[2005-08-14 11:34 UTC] jelenkovic at siol dot net
[2005-08-14 21:34 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 02:00:02 2025 UTC |
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