You are here: Re: New to OCI - double results? « PHP Programming Language « IT news, forums, messages
Re: New to OCI - double results?

Posted by Rik on 01/26/07 19:58

Sonnich <sonnich.jensen@elektrobit.com> wrote:

> Hello there
>
> I'm trying to work with the example for OCI... and the $row returns 2
> values, the same twice, but my query only have one... code below.
>
> Can anyone explain?
>
> while ($row =3D oci_fetch_array($stid, OCI_RETURN_NULLS))

http://www.php.net/oci_fetch_array

"returns an array with both associative and numeric indices."

So, tell it which one to use either associative:
oci_fetch_assoc($stid, OCI_RETURN_NULLS)

Or numerical:
oci_fetch_row($stid, OCI_RETURN_NULLS)

If you don't need the indexes, the last one seems to be the fastest.
-- =

Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация