From: [EMAIL PROTECTED]
Operating system: AIX 4.3.3
PHP version: 4.1.2
PHP Bug Type: ODBC related
Bug description: Self-References not supported
I was trying to view a self-referenced Table (parent_id is the id of
another member); with OBDC towards DB2 (on AIX 4.3.3) PHP does not set the
array right; I dont get the parents name but the childs name twice.
Code
====
$conn=odbc_connect("db", "user", "pass");
$stmt="select a.bm_id, a.bm_bezeichnung, b.bm_bezeichnung as
parent_bm_bezeichnung from schema.table a, schema.table b where
b.bm_id=a.bes_bm_id";
$res=odbc_exec($conn,$stmt);
print odbc_result_all($res);
ODBC Result
===========
BM_ID BM_BEZEICHNUNG PARENT_BM_BEZEICHNUNG
5 Tonband Tonband
6 Handy Handy
2
(the 2 is new, seems to be the "2 records selected" rest)
DB2 Result
==========
BM_ID BM_BEZEICHNUNG PARENT_BM_BEZEICHNUNG
------ -------------------- ---------------------
5 Tonband Telefonisch
6 Handy Telefonisch
2 record(s) selected.
--
Edit bug report at http://bugs.php.net/?id=17141&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17141&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17141&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17141&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17141&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17141&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17141&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17141&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17141&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17141&r=globals