|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-26 15:32 UTC] jani@php.net
[2007-08-03 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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 ??H@??H@ 3 ??H@ NULL 4 45 aaaaa 5 NULL bbbb 6 12 ccccc