Subject | Re: [firebird-php] Re: firebird15/ADOdb |
---|---|
Author | Lester Caine |
Post date | 2004-05-30T07:57:12Z |
dleec45 wrote:
$rs[0]['ZIP'] will give you the first Zip code
$rs[1]['ZIP'] will give you the second!
Data has been returned in ASSOC mode, as the result fields have names.
So the question is "Where is the [fields] => Array entry ?" it should
follow the [-array] => Array entry.
All we are looking at here is Example 1 in docs-adodb.html - so it
SHOULD be working ;)
Note also that ALL the results are available in $rs this is why we need
to control what is returned, and how many records. What happens when you
look for a particular ZIP? It should return one result [-array][0] and
the [fields] ...
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
> I have used print_r($rs) and with the * in the SELECT I get:Have a closer look at what has been returned!
>
> adorecordset_array Object
> (
> [databaseType] => array
> [_array] => Array
> (
> [0] => Array
> (
> [STID] => AK
> [ZIP] => 99501
> [CITY] => ANCHORAGE
> )
>
> [1] => Array
> (
> [STID] => AK
> [ZIP] => 99502
> [CITY] => ANCHORAGE
> )
> etc....
>
> and with SELECT zip I get:
>
> adorecordset_array Object
> (
> [databaseType] => array
> [_array] => Array
> (
> [0] => Array
> (
> [ZIP] => 99501
> )
>
> [1] => Array
> (
> [ZIP] => 99502
> )
>
> so I don't see a difference except the amount of data returned.
> Knowing this, I don't see why I can't print the data when I use the:
$rs[0]['ZIP'] will give you the first Zip code
$rs[1]['ZIP'] will give you the second!
Data has been returned in ASSOC mode, as the result fields have names.
So the question is "Where is the [fields] => Array entry ?" it should
follow the [-array] => Array entry.
All we are looking at here is Example 1 in docs-adodb.html - so it
SHOULD be working ;)
Note also that ALL the results are available in $rs this is why we need
to control what is returned, and how many records. What happens when you
look for a particular ZIP? It should return one result [-array][0] and
the [fields] ...
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services