On Wed, Sep 18, 2002 at 01:17:34PM -0600, notoriousvic_ca wrote:
> 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?
you have to say:
as SELECT a.ITEM_CLASS as order ...
(note the "as")
and it should work
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Thies C. Arntzen - Looking for all sorts of freelance work - just ask..
Whishlist: http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php