ID:               26012
 Updated by:       [EMAIL PROTECTED]
 Reported By:      boccara at netvision dot net dot il
 Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: win2k SBS SP4  & Apache 2.0.47
 PHP Version:      4.3.4RC2
 New Comment:

The C API provided from Microsoft is the problem in this cse. An ampty
column is returned as a single space and not as a true empty column (a
string with length 0). It is not possible to see the difference between
an empty column and a column with a single space.

In this case it is a bug, but not in PHP! As stated before the PHP
extensions sould not attempt to 'fix' data but just present them as is.


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

[2003-10-28 15:38:02] boccara at netvision dot net dot il

I made some change, and let me tell you that uou have a BIG bug.
I returned to 4.3.4RC2
I made a request WITHOUT any RTRIM
my data are defined as varchar(100) and NOT as char.
I have located where there is a problem:

query : select a from table test

( a is varchar(100))

when a is blank (without any caractere but not null ) it return the
ascii code 32 wich is a space.

if it is not a BUG I would like to understand what it is ???

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

[2003-10-28 14:09:46] [EMAIL PROTECTED]

This fix makes fetching on char() columns work differently that it used
to.

MMSQL Server and other RDBMS's patches the data in a char() column with
trailing spaces. When data are fetched with the new version of the
extension these extra spaces are returned.

A char() column is a fixed length datatype so the database adds extra
spaces when the content is shortar than the defined length. Using a
varchar() column is a way to avoid this problem.

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

[2003-10-28 11:45:36] [EMAIL PROTECTED]

Bug #25777 was fixed in 4.3.4RC2..


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

[2003-10-28 11:21:34] boccara at netvision dot net dot il

when you write previously you mean previous this version ??

because in the 4.3.4 RC1 it works !

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

[2003-10-28 10:59:08] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Previously mssql data was always rtrimed, however that's wrong because
it modifies the original data. This caused a problem for people who
needed those trailing space. Ultimately, the job of database extension
is to fetch the data as is (like other db extensions already do) and
not to mangle it in any way.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26012

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

Reply via email to