ID: 26351 Comment by: justin22 at v-biz dot net Reported By: jabberwocky at ibplanet dot com Status: Bogus Bug Type: MSSQL related Operating System: Any PHP Version: 4.3.4 New Comment:
I've just further researched the issue with bug #25777 and bug #9854 (back in 2001). If it is the case that the version 6.0 db-library is the problem, then migrating to the freetds library is the best way to advance the mssql extension, as suggested by rmk Justin Previous Comments: ------------------------------------------------------------------------ [2003-12-17 21:14:46] justin22 at v-biz dot net I concur that this is actually a bug introduced in 4.3.4 I have a varchar field that is null (not empty) that is also being returning a single space. In version 4.3.3 this same field is returned as an empty string. Ideally it should be returned as PHP null value, but that could break other peoples programs. There may be some confusion here related to compatibility issues. SQL Server 6.5 interpreted a single space as an empty string - see the documentation on sp_dbcmptlevel for a basic introduction. What 'interpreted' means here i'm not sure, it seems to be just when parsing sql queries. see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vdbt7/html/dvconquerydesignerconsiderationssqlserver.asp for possibly more info. This problem has been reported in bug #26315, #26012 and this one, so I'm not happy with it being regarded as Bogus. If it is a genuine compatibility issue, then perhaps it should be resolved by creating a new php ini setting that could allow for either compatibility modes. I've come across this bug when trying to resolve bug #26589, which may also require a modification to the mssql module. Justin von Perger ------------------------------------------------------------------------ [2003-11-21 11:56:27] [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. Read previous bug reports regarding this issue. ------------------------------------------------------------------------ [2003-11-21 11:44:47] jabberwocky at ibplanet dot com Description: ------------ With the new MSSQL so-called "bugfix" there seem to be a lot of problems, first of all, when accessing the DB, and retrieving a field that has a null value in it, a single space (" ") is returned instead of a null string. This is also the case if you retrieve a numerical value of 0 - instead of retrieving the number 0 - a single space (" ") is returned. This has caused all sort of problems with the MSSQL Database Driver that I am currently coding for Invision Power Board (http://www.invisionboard.com/?mssqldriver) Reproduce code: --------------- Source Code available on request from PHP team by emailing [EMAIL PROTECTED] (as this is a paid product) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26351&edit=1