Subject | Re: firebird15/ADOdb |
---|---|
Author | dleec45 |
Post date | 2004-05-30T21:36:21Z |
--- In firebird-php@yahoogroups.com, Lester Caine <lester@l...> wrote:
this conversion I'm 'trying' to pull off, there 'seems' to be a lot of
code that could be more easily accomplished in procedures. How does
one determine when a procedure is best or more reallistic than code?
I realize you may not had taken the time or even be interested in the
freetrade code I mentioned earlier, but there is a lot code in the
project that seems like it would be better if placed in a procedure
and I'm just wondering where one draws the line. Any input? Thanks
again.
> dleec45 wrote:you
>
> > I have used print_r($rs) and with the * in the SELECT I get:
> >
> > 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:
>
> Have a closer look at what has been returned!
>
> $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
> look for a particular ZIP? It should return one result [-array][0] andmy code somewhere but couldn't see the forest for the trees!!!! In
> the [fields] ...
>
>Lester the fault was in MY SELECT statement!!! Knew it had to be in
this conversion I'm 'trying' to pull off, there 'seems' to be a lot of
code that could be more easily accomplished in procedures. How does
one determine when a procedure is best or more reallistic than code?
I realize you may not had taken the time or even be interested in the
freetrade code I mentioned earlier, but there is a lot code in the
project that seems like it would be better if placed in a procedure
and I'm just wondering where one draws the line. Any input? Thanks
again.