#29383 [Opn]: A SELECT statement returns instead of an empty value, a value containing space

2004-09-21 Thread gunther at ultraconsulting dot com
 ID:   29383
 User updated by:  gunther at ultraconsulting dot com
 Reported By:  gunther at ultraconsulting dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Windows 2000
 PHP Version:  4.3.7, 5.0.0
 New Comment:

It seems this problem is a long term problem as it was first reported a
year ago. Not quite sure why the developers are tagging these reports as
'Bogus'. Everybody using PHP 4.3.3 and higher and MSSQL is affected. The
problem is definetely in the php_mssql.dll as the version 4.3.2 dll is
working fine, even with PHP 4.3.8.
There is no way to upgrade to PHP 5.0.x as the functioning dll doesn't
work with 5.0.
Any clues if and when this bug will be fixed? 
Or at least a workaround for this bug without changing thousands of
lines of code withing the application.


Previous Comments:


[2004-07-26 14:25:18] gunther at ultraconsulting dot com

This is the same as Bug #29292 .. didn't find that one before ...



[2004-07-26 04:49:49] gunther at ultraconsulting dot com

php_mssql.dll up to PHP 4.3.3 is working fine, problem first started
with PHP 4.3.4



[2004-07-26 03:46:00] gunther at ultraconsulting dot com

Description:

A SELECT statement returns instead of an empty value for a varchar
field, a value containing a single space. Therefore using the empty()
directive will not work anymore.
Problem only happens with php_mssql.dll from year 2004 for PHP version
4.3.7 and 5.0.0. Using a previous dll from 3/13/03 (4.3.2-RC1) for
instance solves the problem ... but might cause others.


Reproduce code:
---
?php
$db_host = 'localhost';
$db_user = 'sa';
$db_pass = '';

if ($dbh = mssql_connect($db_host, $db_user, $db_pass)) {
print ('brbrDB: '.$db_name.' connected');
} else {
print (brDB NOK );
exit;
} 


 $query = 'SELECT * FROM mydb WHERE id = 1';

  $result = mssql_query($query, $dbh);
  {
  if ($row = mssql_fetch_array($result, MSSQL_ASSOC)) {
  print_r($row);
  print(\nbr( . $row['id'] . ')');
  }
  }
?

Expected result:

...
()

Actual result:
--
...
( )






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


#29383 [Opn]: A SELECT statement returns instead of an empty value, a value containing space

2004-07-26 Thread gunther at ultraconsulting dot com
 ID:   29383
 User updated by:  gunther at ultraconsulting dot com
 Reported By:  gunther at ultraconsulting dot com
 Status:   Open
 Bug Type: MSSQL related
-Operating System: w2k
+Operating System: Windows 2000
-PHP Version:  4.3.7
+PHP Version:  4.3.7, 5.0.0
 New Comment:

This is the same as Bug #29292 .. didn't find that one before ...


Previous Comments:


[2004-07-26 04:49:49] gunther at ultraconsulting dot com

php_mssql.dll up to PHP 4.3.3 is working fine, problem first started
with PHP 4.3.4



[2004-07-26 03:46:00] gunther at ultraconsulting dot com

Description:

A SELECT statement returns instead of an empty value for a varchar
field, a value containing a single space. Therefore using the empty()
directive will not work anymore.
Problem only happens with php_mssql.dll from year 2004 for PHP version
4.3.7 and 5.0.0. Using a previous dll from 3/13/03 (4.3.2-RC1) for
instance solves the problem ... but might cause others.


Reproduce code:
---
?php
$db_host = 'localhost';
$db_user = 'sa';
$db_pass = '';

if ($dbh = mssql_connect($db_host, $db_user, $db_pass)) {
print ('brbrDB: '.$db_name.' connected');
} else {
print (brDB NOK );
exit;
} 


 $query = 'SELECT * FROM mydb WHERE id = 1';

  $result = mssql_query($query, $dbh);
  {
  if ($row = mssql_fetch_array($result, MSSQL_ASSOC)) {
  print_r($row);
  print(\nbr( . $row['id'] . ')');
  }
  }
?

Expected result:

...
()

Actual result:
--
...
( )






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


#29383 [Opn]: A SELECT statement returns instead of an empty value, a value containing space

2004-07-25 Thread gunther at ultraconsulting dot com
 ID:   29383
 User updated by:  gunther at ultraconsulting dot com
 Reported By:  gunther at ultraconsulting dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: w2k
 PHP Version:  4.3.7
 New Comment:

php_mssql.dll up to PHP 4.3.3 is working fine, problem first started
with PHP 4.3.4


Previous Comments:


[2004-07-26 03:46:00] gunther at ultraconsulting dot com

Description:

A SELECT statement returns instead of an empty value for a varchar
field, a value containing a single space. Therefore using the empty()
directive will not work anymore.
Problem only happens with php_mssql.dll from year 2004 for PHP version
4.3.7 and 5.0.0. Using a previous dll from 3/13/03 (4.3.2-RC1) for
instance solves the problem ... but might cause others.


Reproduce code:
---
?php
$db_host = 'localhost';
$db_user = 'sa';
$db_pass = '';

if ($dbh = mssql_connect($db_host, $db_user, $db_pass)) {
print ('brbrDB: '.$db_name.' connected');
} else {
print (brDB NOK );
exit;
} 


 $query = 'SELECT * FROM mydb WHERE id = 1';

  $result = mssql_query($query, $dbh);
  {
  if ($row = mssql_fetch_array($result, MSSQL_ASSOC)) {
  print_r($row);
  print(\nbr( . $row['id'] . ')');
  }
  }
?

Expected result:

...
()

Actual result:
--
...
( )






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