|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-26 04:49 UTC] gunther at ultraconsulting dot com
[2004-07-26 14:25 UTC] gunther at ultraconsulting dot com
[2004-09-22 02:35 UTC] gunther at ultraconsulting dot com
[2004-09-30 12:52 UTC] andreyra at chtivo dot ru
[2004-11-05 09:43 UTC] dcrignon at adequasys dot com
[2004-12-13 07:30 UTC] sniper@php.net
[2004-12-21 01:00 UTC] php-bugs at lists dot php dot net
[2005-07-28 20:25 UTC] mcknightj at lovullo dot com
[2005-08-02 00:12 UTC] mcknightj at lovullo dot com
[2005-09-06 16:52 UTC] mcknight at chek dot com
[2006-05-04 19:32 UTC] bhiggins at gmail dot com
[2006-05-04 19:44 UTC] tony2001@php.net
[2006-05-04 20:05 UTC] gunther at ultraconsulting dot com
[2006-05-04 20:13 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 04:00:02 2025 UTC |
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 ('<br><br>DB: "'.$db_name.'" connected'); } else { print ("<br>DB 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("\n<br>(" . $row['id'] . ')'); } } ?> Expected result: ---------------- ... () Actual result: -------------- ... ( )