From: jay at nicwr dot mah dot nic dot in
Operating system: Linux 8.0
PHP version: 4.3.2
PHP Bug Type: ODBC related
Bug description: IBM DB2 Unique Key Problem
Description:
------------
I have IBM DB2 V 7.2 EE Fix Pack 7
My Php is enabled with ibm-db2 support
I have a table test (c1 int not null,c2 int,c3 int)
I have a unique key on table test as (c1) with include options for
(c2,C3)
If I have a sample data
1,null,null
2,1,null,
3,null,1
4,1,2
If I access the data thru my php script I do not get desirable result.
Reproduce code:
---------------
<?php
$Conn=odbc_connect("dbname","db2admin","db2admin");
$sel="Select c1,c2,c3 from dbadmin.test";
$odbc_res=odbc_exec($Conn,$sel);
while(odbc_fetch_row($odbc_res))
{
echo "Record : ";
echo odbc_result($odbc_res,1);
echo "-";
echo odbc_result($odbc_res,2);
echo "-";
echo odbc_result($odbc_res,3);
echo "-End Record<br>";
}
?>
Expected result:
----------------
Expected Result is as follows
-----------------------------
Record:1---End Record
Record:2-1--End Record
Record:3--1-End Record
Record:4-1-2-End Record
Actual result:
--------------
Actual Results Appear as follows
--------------------------------
Record : ---End Record
Record : ---End Record
Record : ---End Record
Record : 4-1-2-End Record
--
Edit bug report at http://bugs.php.net/?id=26130&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26130&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26130&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26130&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26130&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26130&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26130&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26130&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26130&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26130&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26130&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26130&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26130&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26130&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26130&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26130&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26130&r=float