From:             ovendrell at oip dot jazztel dot es
Operating system: Linux
PHP version:      5.1.4
PHP Bug Type:     ODBC related
Bug description:  NULL values on a first record

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 bug report at http://bugs.php.net/?id=37900&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37900&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37900&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37900&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37900&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37900&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37900&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37900&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37900&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37900&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37900&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37900&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37900&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37900&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37900&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37900&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37900&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37900&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37900&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37900&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37900&r=mysqlcfg

Reply via email to