ID: 37900 Updated by: [EMAIL PROTECTED] Reported By: ovendrell at oip dot jazztel dot es -Status: Open +Status: Feedback Bug Type: ODBC related Operating System: Linux PHP Version: 5.1.4 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi And try using the PDO ODBC instead. It has been reported to work much better.. Previous Comments: ------------------------------------------------------------------------ [2006-06-23 10:10:18] ovendrell at oip dot jazztel dot es Description: ------------ I work with this environment: * OS: Linux * Web server: Apache 2.0 * DB server: Microsoft SQL server (7.0 or 2000) * PHP 5.1.2 I execute a query with odbc_query() function. when the first record result has a NULL value in a field, the next record that doesn't has a NULL value in the same field doesn't return the correct value. It returns unrecognizable chars. Reproduce code: --------------- $res = odbc_exec ($bd, "SELECT Id, Num, Obs FROM publicacions"); odbc_result_all ($res); ----------- $res = odbc_exec ($bd, "SELECT Id, Num FROM publicacions"); while (odbc_fetch_row ($res)) echo odbc_result ($res, "Id")." ".odbc_result ($res, "Num")." ".odbc_result ($res, "Obs")."<br>"; Expected result: ---------------- Id Num Obs -------------- 1 NULL NULL 2 NULL comment 3 23 NULL 4 45 aaaaa 5 NULL bbbb 6 12 ccccc Actual result: -------------- Id Num Obs -------------- 1 NULL NULL 2 NULL [EMAIL PROTECTED]@ 3 èH@ NULL 4 45 aaaaa 5 NULL bbbb 6 12 ccccc ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37900&edit=1