ID: 37900
Comment by: johnbrown at yahoo dot com
Reported By: ovendrell at oip dot jazztel dot es
Status: Open
Bug Type: ODBC related
Operating System: Linux
PHP Version: 5.1.4
New Comment:
leave it
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