PHP4 OCI8 SELECT from view BUG

From: Date: Wed, 18 Sep 2002 19:17:34 +0000
Subject: PHP4 OCI8 SELECT from view BUG
Groups: php.db 
Request: Send a blank email to php-db+get-21839@lists.php.net to get a copy of this message
Hi I am a programmer and I just started using PHP4. I have noticed that when I retreive values from a view into an associated array using OCI8, I array will not carry the correct field name For example if I create a view like : create or replace view view_specimen_details as SELECT a.ITEM_CLASS "order", a.FIELD2 "scientific name", a.FIELD16 "common name", FROM catalogue a Then execute a select statement like so : @ocifetchinto($stmt,&$result[],OCI_ASSOC) Then I will iterate through the array : foreach ($resultSet[0] as $fN => $fV) { echo $fN; echo $fV; echo "<br>"; } I get : ITEM_CLASS [value] FIELD2 [value] FIELD16 [value] What I want is : order [value] scientific name [value] common name [value] Does anyone have a work around?

« previous php.db (#21839) next »