ID:               26315
 Updated by:       [EMAIL PROTECTED]
 Reported By:      webmaster at cbre dot fr
 Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: Windows 2000/2003 Server
 PHP Version:      4.3.4 / 4.4.6
 New Comment:

The bug is in the Microsoft library not in the PHP extension.

Use the php_dblib.dll version of the extension. It does not have the 
problem, though it will require that you update to version 5 of PHP.


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

[2007-04-06 08:48:39] webmaster at cbre dot fr

More than 3 years later (version 4.4.6 tested today) the bug seems to
be still present.
Please, if you don't wan't to consider this issue as a bug, would it be
possible to add a "mssql.trimemptystringspace" option to the mssql
module in order to let developpers choose to activate or not this
feature via init_set() or the php.ini file ?
It would be more efficient than triming all returned row in the PHP
code.
Thanks in advance.
Clement

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

[2004-08-18 22:33:23] jwhatcher at hotmail dot com

'' = ' '. Politely, this is a bug. In transact sql and query analyzer
'' is seen as '' but in php '' is seen as ' '. I am using varchar
fields. This surely breaks several lines of code for the empty function
is now useless when selecting '' out of the database. Please reconsider
and look into this item. 

Add autotrim to the ini file if this would fix the problem.

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

[2004-06-20 02:49:52] spam2 at rhsoft dot net

hmm this is a bug
i developed a cms first for mysql and the port for postgre with select
database-type works very fine

the last two days i try to get it running with mssql/msde an nothing
works with this damned spaces

if (!empty($image)) echo "<img src=\"" . $image . "\" />"; for example
makes a big shit :-(

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

[2004-05-24 21:23:07] hagen at woecht dot de

If you must make from a space to '' in your PHP script, how can you
distinguish between a "true" space or "faked" space?
All '' and space in the DB are then '' (:-((()

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

[2004-04-23 10:25:51] tomasz at biznespolska dot pl

In my opinion this is bug, and is still present on version 4.3.6. This
is not only problem with CHAR, and NCHAR columns but also empty VARCHAR
columns returns space.

Example:
$re = mssql_fetch_row(mssql_query("SELECT CAST('' AS VARCHAR(10))"));
print('--'.$re[0].'--');
// the result is: -- --
// and should be: ----

Because of that I still use PHP4.3.3.

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

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/26315

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

Reply via email to